3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.43 ms | 1395 KiB | 19 Q