3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "\'\""; $arr = array(); $arr[] = "string : ".$str; $arr[] = "addslashes : ".addslashes($str); $arr[] = "stripslashes : ".stripslashes($str); $arr[] = "stripslashes : ".htmlentities($str); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YKNDI
function name:  (null)
number of ops:  27
compiled vars:  !0 = $str, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%5C%27%22'
    3     1        ASSIGN                                                   !1, <array>
    4     2        CONCAT                                           ~5      'string+%3A+', !0
          3        ASSIGN_DIM                                               !1
          4        OP_DATA                                                  ~5
    5     5        INIT_FCALL                                               'addslashes'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $7      
          8        CONCAT                                           ~8      'addslashes+%3A+', $7
          9        ASSIGN_DIM                                               !1
         10        OP_DATA                                                  ~8
    6    11        INIT_FCALL                                               'stripslashes'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $10     
         14        CONCAT                                           ~11     'stripslashes+%3A+', $10
         15        ASSIGN_DIM                                               !1
         16        OP_DATA                                                  ~11
    7    17        INIT_FCALL                                               'htmlentities'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $13     
         20        CONCAT                                           ~14     'stripslashes+%3A+', $13
         21        ASSIGN_DIM                                               !1
         22        OP_DATA                                                  ~14
    8    23        INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.95 ms | 1395 KiB | 21 Q