3v4l.org

run code in 300+ PHP versions simultaneously
<?php $class = new class { public function sayHi() { return "Hello world!"; } }; $addProduct = function($id) { $this->sayHi(); }; $addProduct->call($someClass);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lXAns
function name:  (null)
number of ops:  10
compiled vars:  !0 = $class, !1 = $addProduct, !2 = $someClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <unknown> 
          1        NEW                                              $4      $3
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    9     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FlXAns%3A9%241'
          5        ASSIGN                                                   !1, ~7
   13     6        INIT_METHOD_CALL                                         !1, 'call'
          7        SEND_VAR_EX                                              !2
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FlXAns%3A9%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lXAns
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        FETCH_THIS                                       $1      
          2        INIT_METHOD_CALL                                         $1, 'sayHi'
          3        DO_FCALL                                      0          
   11     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FlXAns%3A9%241

Class class@anonymous:
Function sayhi:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lXAns
function name:  sayHi
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   'Hello+world%21'
    6     1*     > RETURN                                                   null

End of function sayhi

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.52 ms | 1394 KiB | 13 Q