3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_string = 'Array ( [0] => 2018-08-21 10:00:00 [1] => 2018-08-28 10:00:00 [2] => 2018-09-04 10:00:00 [3] => 2018-09-11 10:00:00 [4] => 2018-09-18 10:00:00 )'; $array_string = preg_replace('/\[(\d+)\] => (.*?)(?=\s+[[)])/s', "'$1' => '$2',", $array_string); eval("\$array1 = $array_string;"); var_dump($array1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G2B5i
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array_string, !1 = $array1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Array+%28+%5B0%5D+%3D%3E+2018-08-21+10%3A00%3A00+%5B1%5D+%3D%3E+2018-08-28+10%3A00%3A00+%5B2%5D+%3D%3E+2018-09-04+10%3A00%3A00+%5B3%5D+%3D%3E+2018-09-11+10%3A00%3A00+%5B4%5D+%3D%3E+2018-09-18+10%3A00%3A00+%29'
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5C%5B%28%5Cd%2B%29%5C%5D+%3D%3E+%28.%2A%3F%29%28%3F%3D%5Cs%2B%5B%5B%29%5D%29%2Fs'
          3        SEND_VAL                                                 '%27%241%27+%3D%3E+%27%242%27%2C'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
    5     7        ROPE_INIT                                     3  ~6      '%24array1+%3D+'
          8        ROPE_ADD                                      1  ~6      ~6, !0
          9        ROPE_END                                      2  ~5      ~6, '%3B'
         10        INCLUDE_OR_EVAL                                          ~5, EVAL
    7    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.65 ms | 1394 KiB | 17 Q