3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { var_dump(list($a, $b) = array(1, 2)); var_dump(($a = 'strlen')('123')); (function() { var_dump('baz'); })(333); } } (new Foo())->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XjM21
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'bar'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FXjM21%3A7%240

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XjM21
function name:  bar
number of ops:  19
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_LIST_R                                     $2      <array>, 0
          2        ASSIGN                                                   !0, $2
          3        FETCH_LIST_R                                     $4      <array>, 1
          4        ASSIGN                                                   !1, $4
          5        SEND_VAL                                                 <array>
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'var_dump'
          8        ASSIGN                                           ~7      !0, 'strlen'
          9        INIT_DYNAMIC_CALL                                        ~7
         10        SEND_VAL_EX                                              '123'
         11        DO_FCALL                                      0  $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                                 
    7    14        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FXjM21%3A7%240'
         15        INIT_DYNAMIC_CALL                                        ~10
         16        SEND_VAL_EX                                              333
         17        DO_FCALL                                      0          
    8    18      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.01 ms | 1396 KiB | 15 Q