3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 3; print_r ($a); $array = array("1" => "PHP code tester Sandbox Online", "foo" => "bar", 5 , 5 => 89009, "case" => "Random Stuff: " . rand(100,999), "PHP Version" => phpversion() ); foreach( $array as $key => $value ){ echo $key."\t=>\t".$value."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 26
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/3AihV
function name:  (null)
number of ops:  28
compiled vars:  !0 = $a, !1 = $array, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 3
    3     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4        INIT_ARRAY                                       ~6      'PHP+code+tester+Sandbox+Online', 1
    6     5        ADD_ARRAY_ELEMENT                                ~6      'bar', 'foo'
          6        ADD_ARRAY_ELEMENT                                ~6      5
          7        ADD_ARRAY_ELEMENT                                ~6      89009, 5
    7     8        INIT_FCALL                                               'rand'
          9        SEND_VAL                                                 100
         10        SEND_VAL                                                 999
         11        DO_ICALL                                         $7      
         12        CONCAT                                           ~8      'Random+Stuff%3A+', $7
         13        ADD_ARRAY_ELEMENT                                ~6      ~8, 'case'
    8    14        INIT_FCALL                                               'phpversion'
         15        DO_ICALL                                         $9      
         16        ADD_ARRAY_ELEMENT                                ~6      $9, 'PHP+Version'
    5    17        ASSIGN                                                   !1, ~6
   11    18      > FE_RESET_R                                       $11     !1, ->26
         19    > > FE_FETCH_R                                       ~12     $11, !2, ->26
         20    >   ASSIGN                                                   !3, ~12
   12    21        CONCAT                                           ~14     !3, '%09%3D%3E%09'
         22        CONCAT                                           ~15     ~14, !2
         23        CONCAT                                           ~16     ~15, '%0A'
         24        ECHO                                                     ~16
   11    25      > JMP                                                      ->19
         26    >   FE_FREE                                                  $11
   13    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.02 ms | 1396 KiB | 19 Q