3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User{ function __construct($name = null){ $this->name = $name; } function __toString(){return 'stdClass';}} $user = new User('test'); var_dump(new $user);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E8DNp
function name:  (null)
number of ops:  12
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'user'
    5     1        NEW                                              $1      'User'
          2        SEND_VAL_EX                                              'test'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
    7     5        INIT_FCALL                                               'var_dump'
          6        FETCH_CLASS                                   0  $4      !0
          7        NEW                                              $5      $4
          8        DO_FCALL                                      0          
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

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

End of function __construct

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

End of function __tostring

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.6 ms | 1400 KiB | 15 Q