3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} $a = null; $f = new Foo($a = 123); var_dump($a); class Bar { function __constructor(){} } $b = null; $g = new Bar($b = 123); var_dump($b); class Baz { function __constructor($x){$x;} } $c = null; $h = new Baz($c = 123); var_dump($c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oPo6H
function name:  (null)
number of ops:  28
compiled vars:  !0 = $a, !1 = $f, !2 = $b, !3 = $g, !4 = $c, !5 = $h
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, null
    4     1        NEW                                              $7      'Foo'
          2        ASSIGN                                           ~8      !0, 123
          3        SEND_VAL_EX                                              ~8
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $7
    5     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    8     9        ASSIGN                                                   !2, null
    9    10        NEW                                              $13     'Bar'
         11        ASSIGN                                           ~14     !2, 123
         12        SEND_VAL_EX                                              ~14
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !3, $13
   10    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
   13    18        ASSIGN                                                   !4, null
   14    19        NEW                                              $19     'Baz'
         20        ASSIGN                                           ~20     !4, 123
         21        SEND_VAL_EX                                              ~20
         22        DO_FCALL                                      0          
         23        ASSIGN                                                   !5, $19
   15    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !4
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Class Foo: [no user functions]
Class Bar:
Function __constructor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oPo6H
function name:  __constructor
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

End of function __constructor

End of class Bar.

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

End of function __constructor

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.37 ms | 1388 KiB | 15 Q