3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array( json_decode('{"foo":"bar"}'), "hello", 3, array("baz", "bay"), "world" ); foreach ($test as $case) { try { $value = (string) $case; print $value; } catch (Exception $e) { print "<pre>"; var_dump($e); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Found catch point at position: 15
Branch analysis from position: 15
2 jumps found. (Code = 107) Position 1 = 16, Position 2 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
filename:       /in/O0Xkh
function name:  (null)
number of ops:  23
compiled vars:  !0 = $test, !1 = $case, !2 = $value, !3 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%7B%22foo%22%3A%22bar%22%7D'
          2        DO_ICALL                                         $4      
          3        INIT_ARRAY                                       ~5      $4
    5     4        ADD_ARRAY_ELEMENT                                ~5      'hello'
    6     5        ADD_ARRAY_ELEMENT                                ~5      3
    4     6        ADD_ARRAY_ELEMENT                                ~5      <array>
    8     7        ADD_ARRAY_ELEMENT                                ~5      'world'
    3     8        ASSIGN                                                   !0, ~5
   11     9      > FE_RESET_R                                       $7      !0, ->21
         10    > > FE_FETCH_R                                               $7, !1, ->21
   13    11    >   CAST                                          6  ~8      !1
         12        ASSIGN                                                   !2, ~8
   14    13        ECHO                                                     !2
         14      > JMP                                                      ->20
   15    15  E > > CATCH                                       last         'Exception'
   16    16    >   ECHO                                                     '%3Cpre%3E'
   17    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
   11    20    > > JMP                                                      ->10
         21    >   FE_FREE                                                  $7
   19    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.63 ms | 1400 KiB | 17 Q