3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '1/1 [==============================] - 1s 1s/step [ { "image_id": "mahomes1", "mean_score_prediction": 6.3682564571499825 }, { "image_id": "mahomes2", "mean_score_prediction": 6.7501190304756165 }, { "image_id": "mahomes3", "mean_score_prediction": 6.3136263862252235 }, ]'; $string = preg_replace(array('/^[^\v]+/', '/,(\s+\])/'), array('', '$1'), $string); $dict = json_decode($string); print_r($dict);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vRnS9
function name:  (null)
number of ops:  15
compiled vars:  !0 = $string, !1 = $dict
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1%2F1+%5B%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%5D+-+1s+1s%2Fstep%0A%5B%0A++%7B%0A++++%22image_id%22%3A+%22mahomes1%22%2C%0A++++%22mean_score_prediction%22%3A+6.3682564571499825%0A++%7D%2C%0A++%7B%0A++++%22image_id%22%3A+%22mahomes2%22%2C%0A++++%22mean_score_prediction%22%3A+6.7501190304756165%0A++%7D%2C%0A++%7B%0A++++%22image_id%22%3A+%22mahomes3%22%2C%0A++++%22mean_score_prediction%22%3A+6.3136263862252235%0A++%7D%2C+%0A%5D'
   18     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 <array>
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
   19     7        INIT_FCALL                                               'json_decode'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
   20    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.07 ms | 1461 KiB | 16 Q