3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '{"t":"abc-1","d":"2017-12-29 12:42:53"} {"t":"abc-2","d":"2017-12-29 12:43:05"} {"t":"abc-3","d":"2017-12-30 14:42:09"} {"t":"code-4","d":"2017-12-30 14:42:20"}'; $arr = explode(PHP_EOL, $s); Foreach($arr as $line){ $json[] = json_decode($line,true); } Var_dump($json);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/97m0E
function name:  (null)
number of ops:  20
compiled vars:  !0 = $s, !1 = $arr, !2 = $line, !3 = $json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22t%22%3A%22abc-1%22%2C%22d%22%3A%222017-12-29+12%3A42%3A53%22%7D%0A%7B%22t%22%3A%22abc-2%22%2C%22d%22%3A%222017-12-29+12%3A43%3A05%22%7D%0A%7B%22t%22%3A%22abc-3%22%2C%22d%22%3A%222017-12-30+14%3A42%3A09%22%7D%0A%7B%22t%22%3A%22code-4%22%2C%22d%22%3A%222017-12-30+14%3A42%3A20%22%7D'
    7     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%0A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    8     6      > FE_RESET_R                                       $7      !1, ->15
          7    > > FE_FETCH_R                                               $7, !2, ->15
    9     8    >   INIT_FCALL                                               'json_decode'
          9        SEND_VAR                                                 !2
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $9      
         12        ASSIGN_DIM                                               !3
         13        OP_DATA                                                  $9
    8    14      > JMP                                                      ->7
         15    >   FE_FREE                                                  $7
   11    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.9 ms | 1007 KiB | 16 Q