3v4l.org

run code in 300+ PHP versions simultaneously
<?php function default_args($test = FALSE, $context) { var_dump($test); if ($test === FALSE) {echo 'true';} } default_args(NULL, []); function no_default_args($test, $context) { var_dump($test); if ($test === FALSE) {echo 'true';} } no_default_args(NULL, []);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nih2k
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'default_args'
          1        SEND_VAL                                                 null
          2        SEND_VAL                                                 <array>
          3        DO_FCALL                                      0          
   13     4        INIT_FCALL                                               'no_default_args'
          5        SEND_VAL                                                 null
          6        SEND_VAL                                                 <array>
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function default_args:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/nih2k
function name:  default_args
number of ops:  9
compiled vars:  !0 = $test, !1 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    5     5        TYPE_CHECK                                    4          !0
          6      > JMPZ                                                     ~3, ->8
          7    >   ECHO                                                     'true'
    6     8    > > RETURN                                                   null

End of function default_args

Function no_default_args:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/nih2k
function name:  no_default_args
number of ops:  9
compiled vars:  !0 = $test, !1 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
   11     5        TYPE_CHECK                                    4          !0
          6      > JMPZ                                                     ~3, ->8
          7    >   ECHO                                                     'true'
   12     8    > > RETURN                                                   null

End of function no_default_args

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.35 ms | 1001 KiB | 16 Q