3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['M-am întîlnit ieri cu','fosta mea profă de matematică']; $text = implode(",",$array); // this looks good in db $json = json_encode($array); // this don't and returns error when try to decode later. var_dump($array, json_decode($json));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9ZQQj
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array, !1 = $text, !2 = $json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    6     6        INIT_FCALL                                               'json_encode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !2, $6
    8    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        INIT_FCALL                                               'json_decode'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $8      
         15        SEND_VAR                                                 $8
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.65 ms | 1002 KiB | 17 Q