3v4l.org

run code in 300+ PHP versions simultaneously
<?php $person = array ( 'firstname' => 'Richard', 'lastname' => 'Castera' ); $p = (object) $person; echo $p->firstname; // Will print 'Richard' $array = [ 'd' => 'f', 's' => 's', ]; $obj = (object) $arrary; echo ($obj->d);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OeQUC
function name:  (null)
number of ops:  11
compiled vars:  !0 = $person, !1 = $p, !2 = $array, !3 = $obj, !4 = $arrary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1        CAST                                          8  ~6      !0
          2        ASSIGN                                                   !1, ~6
    8     3        FETCH_OBJ_R                                      ~8      !1, 'firstname'
          4        ECHO                                                     ~8
    9     5        ASSIGN                                                   !2, <array>
   13     6        CAST                                          8  ~10     !4
          7        ASSIGN                                                   !3, ~10
   14     8        FETCH_OBJ_R                                      ~12     !3, 'd'
          9        ECHO                                                     ~12
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.22 ms | 1392 KiB | 13 Q