3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public function __construct() { return 123; } public function __destruct() { return 123; } public function __clone() { return 123; } } var_dump((new Foo())->__construct()); var_dump((new Foo())->__destruct()); var_dump((new Foo())->__clone());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rGc85
function name:  (null)
number of ops:  22
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                                   'var_dump'
          1        NEW                                                  $0      'Foo'
          2        DO_FCALL                                          0          
          3        INIT_METHOD_CALL                                             $0, '__construct'
          4        DO_FCALL                                          0  $2      
          5        SEND_VAR                                                     $2
          6        DO_ICALL                                                     
   16     7        INIT_FCALL                                                   'var_dump'
          8        NEW                                                  $4      'Foo'
          9        DO_FCALL                                          0          
         10        INIT_METHOD_CALL                                             $4, '__destruct'
         11        DO_FCALL                                          0  $6      
         12        SEND_VAR                                                     $6
         13        DO_ICALL                                                     
   17    14        INIT_FCALL                                                   'var_dump'
         15        NEW                                                  $8      'Foo'
         16        DO_FCALL                                          0          
         17        INIT_METHOD_CALL                                             $8, '__clone'
         18        DO_FCALL                                          0  $10     
         19        SEND_VAR                                                     $10
         20        DO_ICALL                                                     
         21      > RETURN                                                       1

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

End of function __construct

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

End of function __destruct

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

End of function __clone

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166 ms | 2139 KiB | 14 Q