3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['they "did" it', "some", "other", "elements"]; var_export( [ 'they "did" it' => stripos(json_encode($array), 'they "did" it') !== false, // should be true but isn't 'they \"did\" it' => stripos(json_encode($array), 'they \"did\" it') !== false // should be false but isn't ] );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RjPbX
function name:  (null)
number of ops:  23
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'var_export'
    7     2        INIT_FCALL                                               'stripos'
          3        INIT_FCALL                                               'json_encode'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        SEND_VAL                                                 'they+%22did%22+it'
          8        DO_ICALL                                         $3      
          9        TYPE_CHECK                                  1018  ~4      $3
         10        INIT_ARRAY                                       ~5      ~4, 'they+%22did%22+it'
    8    11        INIT_FCALL                                               'stripos'
         12        INIT_FCALL                                               'json_encode'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $6      
         15        SEND_VAR                                                 $6
         16        SEND_VAL                                                 'they+%5C%22did%5C%22+it'
         17        DO_ICALL                                         $7      
    7    18        TYPE_CHECK                                  1018  ~8      $7
         19        ADD_ARRAY_ELEMENT                                ~5      ~8, 'they+%5C%22did%5C%22+it'
         20        SEND_VAL                                                 ~5
    5    21        DO_ICALL                                                 
   10    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.17 ms | 999 KiB | 16 Q