3v4l.org

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

Class foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.6 ms | 1395 KiB | 15 Q