3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = new class { public function hello() { echo "hello"; } }; $c->hello(); $d = new class(42) { public function __construct($n) {} public function hello() { echo "hello"; } }; $d->hello();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pH5gv
function name:  (null)
number of ops:  14
compiled vars:  !0 = $c, !1 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <true>  
          1        NEW                                              $3      $2
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    7     4        INIT_METHOD_CALL                                         !0, 'hello'
          5        DO_FCALL                                      0          
    9     6        DECLARE_ANON_CLASS                               <undef> 
          7        NEW                                              $8      $7
          8        SEND_VAL_EX                                              42
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $8
   14    11        INIT_METHOD_CALL                                         !1, 'hello'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

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

End of function hello

End of class class@anonymous.

Class class@anonymous:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pH5gv
function name:  __construct
number of ops:  2
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function __construct

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

End of function hello

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.63 ms | 1386 KiB | 13 Q