Adding string with number in php

php

Solution

It casts '3dollars' as a number, getting `$a = 3`.

When you echo, you add 20, to `$a`, so it prints `23` and `$a = 23`.

Then, when you print, you again add 20, so now `$a = 43`.

Problem

``` $a = "3dollars"; $b = 20; echo $a += $b; print($a += $b); ``` Result: ``` 23 43 ``` I have a question from this calculation.$a is a string and $b is number.I am adding both and print using echo its print 23 and print using print return 43.How is it

Original source