3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "", true, false, null, "\x0", 0, "0", ]; var_export( substr_replace($array, 'prefix_', 0, 0) ); echo "\n---\n"; var_export( preg_replace('/^/', 'prefix_', $array) ); echo "\n===\n"; var_export( preg_replace('/$/', '_suffix', $array) ); echo "\n===\n"; var_export( substr_replace(null, 'prefix_', 0, 0) ); echo "\n---\n"; var_export( preg_replace('/^/', 'prefix_', null) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ENVip
function name:  (null)
number of ops:  48
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'var_export'
   14     2        INIT_FCALL                                               'substr_replace'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'prefix_'
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 0
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
   16    10        ECHO                                                     '%0A---%0A'
   17    11        INIT_FCALL                                               'var_export'
   18    12        INIT_FCALL                                               'preg_replace'
         13        SEND_VAL                                                 '%2F%5E%2F'
         14        SEND_VAL                                                 'prefix_'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $4      
         17        SEND_VAR                                                 $4
         18        DO_ICALL                                                 
   20    19        ECHO                                                     '%0A%3D%3D%3D%0A'
   21    20        INIT_FCALL                                               'var_export'
   22    21        INIT_FCALL                                               'preg_replace'
         22        SEND_VAL                                                 '%2F%24%2F'
         23        SEND_VAL                                                 '_suffix'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $6      
         26        SEND_VAR                                                 $6
         27        DO_ICALL                                                 
   24    28        ECHO                                                     '%0A%3D%3D%3D%0A'
   25    29        INIT_FCALL                                               'var_export'
   26    30        INIT_FCALL                                               'substr_replace'
         31        SEND_VAL                                                 null
         32        SEND_VAL                                                 'prefix_'
         33        SEND_VAL                                                 0
         34        SEND_VAL                                                 0
         35        DO_ICALL                                         $8      
         36        SEND_VAR                                                 $8
         37        DO_ICALL                                                 
   28    38        ECHO                                                     '%0A---%0A'
   29    39        INIT_FCALL                                               'var_export'
   30    40        INIT_FCALL                                               'preg_replace'
         41        SEND_VAL                                                 '%2F%5E%2F'
         42        SEND_VAL                                                 'prefix_'
         43        SEND_VAL                                                 null
         44        DO_ICALL                                         $10     
         45        SEND_VAR                                                 $10
         46        DO_ICALL                                                 
   31    47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.52 ms | 1405 KiB | 19 Q