3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar; public $baz; } $o = new stdclass(); $o->bar = "baz"; $o->baz = "boing"; $f = new Foo(); list($f->bar, $f->baz) = (array)$o; var_dump($f);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sh2R2
function name:  (null)
number of ops:  22
compiled vars:  !0 = $o, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'stdclass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    9     3        ASSIGN_OBJ                                               !0, 'bar'
          4        OP_DATA                                                  'baz'
   10     5        ASSIGN_OBJ                                               !0, 'baz'
          6        OP_DATA                                                  'boing'
   11     7        NEW                                              $7      'Foo'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
   12    10        CAST                                          7  ~10     !0
         11        FETCH_LIST_R                                     $11     ~10, 0
         12        ASSIGN_OBJ                                               !1, 'bar'
         13        OP_DATA                                                  $11
         14        FETCH_LIST_R                                     $13     ~10, 1
         15        ASSIGN_OBJ                                               !1, 'baz'
         16        OP_DATA                                                  $13
         17        FREE                                                     ~10
   14    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.05 ms | 1395 KiB | 15 Q