3v4l.org

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

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

End of function __constructor

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.38 ms | 1395 KiB | 15 Q