3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $object = new stdClass; $object->color = 'lavender'; $object->size = 25; $array = json_decode(json_encode($object), TRUE); var_dump($array === (array) $object);
based on 7kbsI
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/2qPrc
function name:  (null)
number of ops:  21
compiled vars:  !0 = $object, !1 = $array
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NEW                                              $2      :-6
         1        DO_FCALL                                      0          
         2        ASSIGN                                                   !0, $2
   3     3        ASSIGN_OBJ                                               !0, 'color'
         4        OP_DATA                                                  'lavender'
   4     5        ASSIGN_OBJ                                               !0, 'size'
         6        OP_DATA                                                  25
   5     7        INIT_FCALL                                               'json_decode'
         8        INIT_FCALL                                               'json_encode'
         9        SEND_VAR                                                 !0
        10        DO_ICALL                                         $7      
        11        SEND_VAR                                                 $7
        12        SEND_VAL                                                 <true>
        13        DO_ICALL                                         $8      
        14        ASSIGN                                                   !1, $8
   7    15        INIT_FCALL                                               'var_dump'
        16        CAST                                          7  ~10     !0
        17        IS_IDENTICAL                                     ~11     !1, ~10
        18        SEND_VAL                                                 ~11
        19        DO_ICALL                                                 
        20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0