3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array(); $object = (object) [ 'title' => '', ]; $object->{title} = 'wootcakes'; array_push($arr, $object); $object = (object) [ 'title' => '', ]; $object->{title} = 'foobars'; array_push($arr, $object); $object = (object) [ 'title' => '', ]; $object->{title} = 'lulmeightz'; array_push($arr, $object); var_dump($arr);
based on EsjLG
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2fqvk
function name:  (null)
number of ops:  32
compiled vars:  !0 = $arr, !1 = $object
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, <array>
   5     1        CAST                                          8  ~3      <array>
         2        ASSIGN                                                   !1, ~3
   7     3        FETCH_CONSTANT                                   ~5      'title'
         4        ASSIGN_OBJ                                               !1, ~5
         5        OP_DATA                                                  'wootcakes'
   9     6        INIT_FCALL                                               'array_push'
         7        SEND_REF                                                 !0
         8        SEND_VAR                                                 !1
         9        DO_ICALL                                                 
  12    10        CAST                                          8  ~8      <array>
        11        ASSIGN                                                   !1, ~8
  14    12        FETCH_CONSTANT                                   ~10     'title'
        13        ASSIGN_OBJ                                               !1, ~10
        14        OP_DATA                                                  'foobars'
  16    15        INIT_FCALL                                               'array_push'
        16        SEND_REF                                                 !0
        17        SEND_VAR                                                 !1
        18        DO_ICALL                                                 
  19    19        CAST                                          8  ~13     <array>
        20        ASSIGN                                                   !1, ~13
  21    21        FETCH_CONSTANT                                   ~15     'title'
        22        ASSIGN_OBJ                                               !1, ~15
        23        OP_DATA                                                  'lulmeightz'
  23    24        INIT_FCALL                                               'array_push'
        25        SEND_REF                                                 !0
        26        SEND_VAR                                                 !1
        27        DO_ICALL                                                 
  25    28        INIT_FCALL                                               'var_dump'
        29        SEND_VAR                                                 !0
        30        DO_ICALL                                                 
        31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0