3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cane = "ciao\ncome\nva\n'gionni!'"; echo $cane; echo "\n"; echo addslashes($cane); echo json_encode($cane);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QjmmF
function name:  (null)
number of ops:  12
compiled vars:  !0 = $cane
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'ciao%0Acome%0Ava%0A%27gionni%21%27'
    4     1        ECHO                                                     !0
    5     2        ECHO                                                     '%0A'
    6     3        INIT_FCALL                                               'addslashes'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
    7     7        INIT_FCALL                                               'json_encode'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $3      
         10        ECHO                                                     $3
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.66 ms | 1394 KiB | 17 Q