3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new \stdClass; $b = new \stdClass; $c = $a; var_dump(spl_hash_object($a)); var_dump(spl_hash_object($b)); var_dump(spl_hash_object($c)); $aa = [$a, $b]; var_dump(in_array($aa, $c));
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/IsaAA
function name:  (null)
number of ops:  36
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $aa
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NEW                                              $4      :-6
         1        DO_FCALL                                      0          
         2        ASSIGN                                                   !0, $4
   4     3        NEW                                              $7      :-4
         4        DO_FCALL                                      0          
         5        ASSIGN                                                   !1, $7
   5     6        ASSIGN                                                   !2, !0
   7     7        INIT_FCALL                                               'var_dump'
         8        INIT_FCALL_BY_NAME                                       'spl_hash_object'
         9        SEND_VAR_EX                                              !0
        10        DO_FCALL                                      0  $11     
        11        SEND_VAR                                                 $11
        12        DO_ICALL                                                 
   8    13        INIT_FCALL                                               'var_dump'
        14        INIT_FCALL_BY_NAME                                       'spl_hash_object'
        15        SEND_VAR_EX                                              !1
        16        DO_FCALL                                      0  $13     
        17        SEND_VAR                                                 $13
        18        DO_ICALL                                                 
   9    19        INIT_FCALL                                               'var_dump'
        20        INIT_FCALL_BY_NAME                                       'spl_hash_object'
        21        SEND_VAR_EX                                              !2
        22        DO_FCALL                                      0  $15     
        23        SEND_VAR                                                 $15
        24        DO_ICALL                                                 
  11    25        INIT_ARRAY                                       ~17     !0
        26        ADD_ARRAY_ELEMENT                                ~17     !1
        27        ASSIGN                                                   !3, ~17
  13    28        INIT_FCALL                                               'var_dump'
        29        INIT_FCALL                                               'in_array'
        30        SEND_VAR                                                 !3
        31        SEND_VAR                                                 !2
        32        DO_ICALL                                         $19     
        33        SEND_VAR                                                 $19
        34        DO_ICALL                                                 
        35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0