3v4l.org

run code in 300+ PHP versions simultaneously
<?php // $array = ['Prinsha', 'Jypsy']; // echo $array[0]; // index is 0 // foreach($model as $key => $data) { // } // $array[1] = 'data'; // $array = ['model' => $model]; // $array = array(); // date('Y-m-d', strtotime("+3 days", $time)); $array = [1, 2, 3, 4]; echo $array[0] . "\n"; $associative = ['a' => 'one', 'apple' => '3v4l']; echo $associative['a'] . "\n"; echo $associative['apple'] . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TJhGZ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array, !1 = $associative
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ASSIGN                                                   !0, <array>
   19     1        FETCH_DIM_R                                      ~3      !0, 0
          2        CONCAT                                           ~4      ~3, '%0A'
          3        ECHO                                                     ~4
   21     4        ASSIGN                                                   !1, <array>
   22     5        FETCH_DIM_R                                      ~6      !1, 'a'
          6        CONCAT                                           ~7      ~6, '%0A'
          7        ECHO                                                     ~7
   23     8        FETCH_DIM_R                                      ~8      !1, 'apple'
          9        CONCAT                                           ~9      ~8, '%0A'
         10        ECHO                                                     ~9
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.88 ms | 1392 KiB | 13 Q