3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = '+259890111***'; $result = preg_replace("/^\+259/", "0", $number); echo $result."\n\n"; $number = '0890111***'; $result = preg_replace("/^\+259/", "0", $number); echo $result."\n\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b5m2O
function name:  (null)
number of ops:  19
compiled vars:  !0 = $number, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2B259890111%2A%2A%2A'
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5E%5C%2B259%2F'
          3        SEND_VAL                                                 '0'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    5     7        CONCAT                                           ~5      !1, '%0A%0A'
          8        ECHO                                                     ~5
    7     9        ASSIGN                                                   !0, '0890111%2A%2A%2A'
    8    10        INIT_FCALL                                               'preg_replace'
         11        SEND_VAL                                                 '%2F%5E%5C%2B259%2F'
         12        SEND_VAL                                                 '0'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !1, $7
    9    16        CONCAT                                           ~9      !1, '%0A%0A'
         17        ECHO                                                     ~9
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
285.73 ms | 1009 KiB | 14 Q