3v4l.org

run code in 500+ PHP versions simultaneously
<?php $needle = "/"; $haystack = "/wamp64\www\Prestashop\En ligne\fac simili/modules/mondialrelay/views/js/admin/hook/order.js"; $replace = "\\"; $pos = 0; // echo $replace; $test = strlen($needle); echo substr_replace($haystack, $replace, $pos, strlen($needle)); echo ' - $test = '. $test; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YkD3E
function name:  (null)
number of ops:  17
compiled vars:  !0 = $needle, !1 = $haystack, !2 = $replace, !3 = $pos, !4 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%2F'
    4     1        ASSIGN                                                       !1, '%2Fwamp64%5Cwww%5CPrestashop%5CEn+ligne%0Cac+simili%2Fmodules%2Fmondialrelay%2Fviews%2Fjs%2Fadmin%2Fhook%2Forder.js'
    5     2        ASSIGN                                                       !2, '%5C'
    6     3        ASSIGN                                                       !3, 0
    8     4        STRLEN                                               ~9      !0
          5        ASSIGN                                                       !4, ~9
   10     6        INIT_FCALL                                                   'substr_replace'
          7        SEND_VAR                                                     !1
          8        SEND_VAR                                                     !2
          9        SEND_VAR                                                     !3
         10        STRLEN                                               ~11     !0
         11        SEND_VAL                                                     ~11
         12        DO_ICALL                                             $12     
         13        ECHO                                                         $12
   11    14        CONCAT                                               ~13     '+-+%24test+%3D+', !4
         15        ECHO                                                         ~13
   13    16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.17 ms | 1318 KiB | 14 Q