3v4l.org

run code in 500+ 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:  15
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        FRAMELESS_ICALL_2                implode             ~4      '%2C', !0
          2        ASSIGN                                                       !1, ~4
    6     3        INIT_FCALL                                                   'json_encode'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $6      
          6        ASSIGN                                                       !2, $6
    8     7        INIT_FCALL                                                   'var_dump'
          8        SEND_VAR                                                     !0
          9        INIT_FCALL                                                   'json_decode'
         10        SEND_VAR                                                     !2
         11        DO_ICALL                                             $8      
         12        SEND_VAR                                                     $8
         13        DO_ICALL                                                     
         14      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.44 ms | 1892 KiB | 16 Q