what in PHP is similar to Actionscript 's "is" operator?

label Programming
account_circle Unassigned
schedule 3 Days
account_balance_wallet $5

what in PHP is similar to Actionscript 's "is" operator?


Oct 22nd, 2013
Hi,

There are not really similar, but both can provide the same results (solution wise).For example, + operator in action script can be demonstrated by simple codes below

trace ( 3 + 1);

Above expression should deliver an aswer of 4. While in PHP the same expression can be written as

echo ( 3 + 1);

However, in PHP parenthesis is not required. So, this will just work fine

echo 3 + 1 ;

While in actionscript, this

trace 3 + 1;

gives us an error.


In the case concatenation, they are similar with the only exemption of the parenthesis.

in actionscript

trace("3" + 1);

PHP

echo ("3" + 1 );

Keep in mind that the the above only 1 is considered as integer. In PHP, it gives you more freedom to change type from one to the other. For example,

$x = "3";
$y = 1 ;

echo ((int)($x) + $y);

gives us an integer 4, while the example before it gives us string 3 concatenated with integer 1.
Oct 22nd, 2013

Like what i have said in the chat box..

actionscript

trace( 50 == "50");

will give us true

while in PHP

echo ( 50 == "50");

should give us false.

Actionscript will give us false if


trace (50 === "50");


PHP is more exquisite, because

echo ("toy" === "Toy");

will gives us false

Oct 22nd, 2013

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Oct 22nd, 2013
...
Oct 22nd, 2013
Aug 21st, 2017
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer