3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { class Bar { public function example($test = null) { var_dump(isset($test)); } } } namespace { $d = new \Foo\Bar; foreach ([null, 0, '', 0.0, function(){}] as $sample) { $d->example($sample); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/XuMgY
function name:  (null)
number of ops:  17
compiled vars:  !0 = $d, !1 = $sample
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $2      'Foo%5CBar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   19     3        INIT_ARRAY                                       ~5      null
          4        ADD_ARRAY_ELEMENT                                ~5      0
          5        ADD_ARRAY_ELEMENT                                ~5      ''
          6        ADD_ARRAY_ELEMENT                                ~5      0
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FXuMgY%3A19%240'
          8        ADD_ARRAY_ELEMENT                                ~5      ~6
          9      > FE_RESET_R                                       $7      ~5, ->15
         10    > > FE_FETCH_R                                               $7, !1, ->15
   20    11    >   INIT_METHOD_CALL                                         !0, 'example'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
   19    14      > JMP                                                      ->10
         15    >   FE_FREE                                                  $7
   23    16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FXuMgY%3A19%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XuMgY
function name:  {closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FXuMgY%3A19%240

Class Foo\Bar:
Function example:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XuMgY
function name:  example
number of ops:  6
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV_INIT                                        !0      null
    9     1        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cvar_dump'
          2        ISSET_ISEMPTY_CV                                 ~1      !0
          3        SEND_VAL_EX                                              ~1
          4        DO_FCALL                                      0          
   10     5      > RETURN                                                   null

End of function example

End of class Foo\Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.61 ms | 1400 KiB | 15 Q