3v4l.org

run code in 300+ PHP versions simultaneously
<?php $class = new class() { private $value; public function __construct($value) { $this->value = $value; } public function value() { return $this->value; } }; $o = new $class(5); var_dump($o->value());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tKs4k
function name:  (null)
number of ops:  15
compiled vars:  !0 = $class, !1 = $o
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
   15     4        FETCH_CLASS                                   0  $6      !0
          5        NEW                                              $7      $6
          6        SEND_VAL_EX                                              5
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $7
   16     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !1, 'value'
         11        DO_FCALL                                      0  $10     
         12        SEND_VAR                                                 $10
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function __construct

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

End of function value

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.53 ms | 1395 KiB | 15 Q