3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isFalseLoose($x) { return $x == false; } function isFalseStrict($x) { return $x === false; } var_dump('------ Loose ------'); var_dump(isFalseLoose(0)); var_dump(isFalseLoose('0')); var_dump(isFalseLoose(false)); var_dump(isFalseLoose('false')); var_dump('------ Strict ------'); var_dump(isFalseStrict(0)); var_dump(isFalseStrict('0')); var_dump(isFalseStrict(false)); var_dump(isFalseStrict('false'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dZ7FC
function name:  (null)
number of ops:  55
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 '------+Loose+------'
          2        DO_ICALL                                                 
   12     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'isfalseloose'
          5        SEND_VAL                                                 0
          6        DO_FCALL                                      0  $1      
          7        SEND_VAR                                                 $1
          8        DO_ICALL                                                 
   13     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'isfalseloose'
         11        SEND_VAL                                                 '0'
         12        DO_FCALL                                      0  $3      
         13        SEND_VAR                                                 $3
         14        DO_ICALL                                                 
   14    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'isfalseloose'
         17        SEND_VAL                                                 <false>
         18        DO_FCALL                                      0  $5      
         19        SEND_VAR                                                 $5
         20        DO_ICALL                                                 
   15    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'isfalseloose'
         23        SEND_VAL                                                 'false'
         24        DO_FCALL                                      0  $7      
         25        SEND_VAR                                                 $7
         26        DO_ICALL                                                 
   18    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAL                                                 '------+Strict+------'
         29        DO_ICALL                                                 
   19    30        INIT_FCALL                                               'var_dump'
         31        INIT_FCALL                                               'isfalsestrict'
         32        SEND_VAL                                                 0
         33        DO_FCALL                                      0  $10     
         34        SEND_VAR                                                 $10
         35        DO_ICALL                                                 
   20    36        INIT_FCALL                                               'var_dump'
         37        INIT_FCALL                                               'isfalsestrict'
         38        SEND_VAL                                                 '0'
         39        DO_FCALL                                      0  $12     
         40        SEND_VAR                                                 $12
         41        DO_ICALL                                                 
   21    42        INIT_FCALL                                               'var_dump'
         43        INIT_FCALL                                               'isfalsestrict'
         44        SEND_VAL                                                 <false>
         45        DO_FCALL                                      0  $14     
         46        SEND_VAR                                                 $14
         47        DO_ICALL                                                 
   22    48        INIT_FCALL                                               'var_dump'
         49        INIT_FCALL                                               'isfalsestrict'
         50        SEND_VAL                                                 'false'
         51        DO_FCALL                                      0  $16     
         52        SEND_VAR                                                 $16
         53        DO_ICALL                                                 
         54      > RETURN                                                   1

Function isfalseloose:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dZ7FC
function name:  isFalseLoose
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        BOOL_NOT                                         ~1      !0
          2      > RETURN                                                   ~1
    5     3*     > RETURN                                                   null

End of function isfalseloose

Function isfalsestrict:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dZ7FC
function name:  isFalseStrict
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        TYPE_CHECK                                    4  ~1      !0
          2      > RETURN                                                   ~1
    9     3*     > RETURN                                                   null

End of function isfalsestrict

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.53 ms | 1017 KiB | 22 Q