3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $serialized_array = serialize(array(1234=>"foobar")); echo "Serialized Array: $serialized_array" . PHP_EOL; $array = unserialize($serialized_array); print_r($array); if (array_key_exists(1234, $array)) { echo "Key Exists!"; } else { echo "Key Not Found!"; }
based on 8hU2B
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
Jump found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Jump found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
Jump found. (Code = 62) Position 1 = -2
filename:       /in/HoLLP
function name:  (null)
number of ops:  24
compiled vars:  !0 = $serialized_array, !1 = $array
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   INIT_FCALL                                               'serialize'
         1        SEND_VAL                                                 <array>
         2        DO_ICALL                                         $2      
         3        ASSIGN                                                   !0, $2
   4     4        NOP                                                      
         5        FAST_CONCAT                                      ~4      'Serialized+Array%3A+', !0
         6        CONCAT                                           ~5      ~4, '%0A'
         7        ECHO                                                     ~5
   6     8        INIT_FCALL                                               'unserialize'
         9        SEND_VAR                                                 !0
        10        DO_ICALL                                         $6      
        11        ASSIGN                                                   !1, $6
   7    12        INIT_FCALL                                               'print_r'
        13        SEND_VAR                                                 !1
        14        DO_ICALL                                                 
   8    15        INIT_FCALL                                               'array_key_exists'
        16        SEND_VAL                                                 1234
        17        SEND_VAR                                                 !1
        18        DO_ICALL                                         $9      
        19      > JMPZ                                                     $9, ->22
   9    20    >   ECHO                                                     'Key+Exists%21'
        21      > JMP                                                      ->23
  11    22    >   ECHO                                                     'Key+Not+Found%21'
  12    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0