3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { print "Hallo"; } } $x = array( new Foo(), new Foo(), new Foo() ); var_dump(end($x)); var_dump(end($x)->bar());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LvmOe
function name:  (null)
number of ops:  25
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~3      $1
   11     3        NEW                                              $4      'Foo'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~3      $4
   12     6        NEW                                              $6      'Foo'
          7        DO_FCALL                                      0          
          8        ADD_ARRAY_ELEMENT                                ~3      $6
    9     9        ASSIGN                                                   !0, ~3
   15    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'end'
         12        SEND_REF                                                 !0
         13        DO_ICALL                                         $9      
         14        SEND_VAR                                                 $9
         15        DO_ICALL                                                 
   16    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'end'
         18        SEND_REF                                                 !0
         19        DO_ICALL                                         $11     
         20        INIT_METHOD_CALL                                         $11, 'bar'
         21        DO_FCALL                                      0  $12     
         22        SEND_VAR                                                 $12
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LvmOe
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'Hallo'
    6     1      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.07 ms | 1395 KiB | 17 Q