3v4l.org

run code in 300+ PHP versions simultaneously
<?php $search = 'Hello %% World'; $searchArray = explode(' ', $search); var_dump($searchArray); echo rtrim(str_repeat('title LIKE ? OR ', count($searchArray)), ' OR '); array_walk($searchArray, function(&$value, $key) { $value .= '%'; }); var_dump($searchArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DSuRP
function name:  (null)
number of ops:  28
compiled vars:  !0 = $search, !1 = $searchArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Hello+%25%25+World'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    5     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    7     9        INIT_FCALL                                               'rtrim'
         10        INIT_FCALL                                               'str_repeat'
         11        SEND_VAL                                                 'title+LIKE+%3F+OR+'
         12        COUNT                                            ~6      !1
         13        SEND_VAL                                                 ~6
         14        DO_ICALL                                         $7      
         15        SEND_VAR                                                 $7
         16        SEND_VAL                                                 '+OR+'
         17        DO_ICALL                                         $8      
         18        ECHO                                                     $8
    8    19        INIT_FCALL                                               'array_walk'
         20        SEND_REF                                                 !1
         21        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FDSuRP%3A8%240'
         22        SEND_VAL                                                 ~9
         23        DO_ICALL                                                 
    9    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FDSuRP%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DSuRP
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $value, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        ASSIGN_OP                                     8          !0, '%25'
          3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FDSuRP%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.23 ms | 941 KiB | 24 Q