3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo extends \stdClass {} $foo = new Foo; $foo->bar = 'bar'; $foo->baz = 42; var_dump($foo); foreach ($foo as $key => $value) { echo("$key: $value").PHP_EOL; } echo json_encode($foo, JSON_PRETTY_PRINT) . PHP_EOL; var_dump((object) json_decode(json_encode($foo)));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/tQpUa
function name:  (null)
number of ops:  37
compiled vars:  !0 = $foo, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $3      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    6     3        ASSIGN_OBJ                                               !0, 'bar'
          4        OP_DATA                                                  'bar'
    7     5        ASSIGN_OBJ                                               !0, 'baz'
          6        OP_DATA                                                  42
    9     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   11    10      > FE_RESET_R                                       $9      !0, ->19
         11    > > FE_FETCH_R                                       ~10     $9, !1, ->19
         12    >   ASSIGN                                                   !2, ~10
   12    13        ROPE_INIT                                     3  ~13     !2
         14        ROPE_ADD                                      1  ~13     ~13, '%3A+'
         15        ROPE_END                                      2  ~12     ~13, !1
         16        CONCAT                                           ~15     ~12, '%0A'
         17        ECHO                                                     ~15
   11    18      > JMP                                                      ->11
         19    >   FE_FREE                                                  $9
   15    20        INIT_FCALL                                               'json_encode'
         21        SEND_VAR                                                 !0
         22        SEND_VAL                                                 128
         23        DO_ICALL                                         $16     
         24        CONCAT                                           ~17     $16, '%0A'
         25        ECHO                                                     ~17
   17    26        INIT_FCALL                                               'var_dump'
         27        INIT_FCALL                                               'json_decode'
         28        INIT_FCALL                                               'json_encode'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $18     
         31        SEND_VAR                                                 $18
         32        DO_ICALL                                         $19     
         33        CAST                                          8  ~20     $19
         34        SEND_VAL                                                 ~20
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.1 ms | 1440 KiB | 16 Q