3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new stdClass(1, 2, 3); // OK, but do nothing $ref = new ReflectionClass('stdClass'); $obj = $ref->newInstance(1, 2, 3); // NOT OK: Class stdClass does not have a constructor, so you cannot pass any constructor arguments
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tjn82
function name:  (null)
number of ops:  17
compiled vars:  !0 = $obj, !1 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'stdClass'
          1        SEND_VAL_EX                                              1
          2        SEND_VAL_EX                                              2
          3        SEND_VAL_EX                                              3
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
    4     6        NEW                                              $5      'ReflectionClass'
          7        SEND_VAL_EX                                              'stdClass'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $5
    5    10        INIT_METHOD_CALL                                         !1, 'newInstance'
         11        SEND_VAL_EX                                              1
         12        SEND_VAL_EX                                              2
         13        SEND_VAL_EX                                              3
         14        DO_FCALL                                      0  $8      
         15        ASSIGN                                                   !0, $8
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.03 ms | 993 KiB | 13 Q