3v4l.org

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

Class foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.42 ms | 1394 KiB | 17 Q