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[] = "htmlentities : ".htmlentities($str); if($str == '\'"'){ $arr[] = "testing : '".$str."'"; } print_r($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 29
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/gUhf9
function name:  (null)
number of ops:  33
compiled vars:  !0 = $str, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%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     'htmlentities+%3A+', $13
         21        ASSIGN_DIM                                               !1
         22        OP_DATA                                                  ~14
    8    23        IS_EQUAL                                                 !0, '%27%22'
         24      > JMPZ                                                     ~15, ->29
    9    25    >   CONCAT                                           ~17     'testing+%3A+%27', !0
         26        CONCAT                                           ~18     ~17, '%27'
         27        ASSIGN_DIM                                               !1
         28        OP_DATA                                                  ~18
   11    29    >   INIT_FCALL                                               'print_r'
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.92 ms | 1396 KiB | 21 Q