3v4l.org

run code in 300+ PHP versions simultaneously
<?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!"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HoLLP
function name:  (null)
number of ops:  21
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        ARRAY_KEY_EXISTS                                         1234, !1
         16      > JMPZ                                                     ~9, ->19
    9    17    >   ECHO                                                     'Key+Exists%21'
         18      > JMP                                                      ->20
   11    19    >   ECHO                                                     'Key+Not+Found%21'
   12    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.87 ms | 1395 KiB | 19 Q