3v4l.org

run code in 300+ PHP versions simultaneously
<?php $idfred = '123.Fred'; $fred = substr($idfred, strpos($idfred, '.')+1); echo $fred, "<br>"; $fred = preg_replace('/^([^.]*)./', '', $idfred); echo $fred, "<br>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PIU3v
function name:  (null)
number of ops:  22
compiled vars:  !0 = $idfred, !1 = $fred
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '123.Fred'
    4     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        INIT_FCALL                                               'strpos'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 '.'
          6        DO_ICALL                                         $3      
          7        ADD                                              ~4      $3, 1
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
    5    11        ECHO                                                     !1
         12        ECHO                                                     '%3Cbr%3E'
    7    13        INIT_FCALL                                               'preg_replace'
         14        SEND_VAL                                                 '%2F%5E%28%5B%5E.%5D%2A%29.%2F'
         15        SEND_VAL                                                 ''
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $7      
         18        ASSIGN                                                   !1, $7
    8    19        ECHO                                                     !1
         20        ECHO                                                     '%3Cbr%3E'
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.22 ms | 1395 KiB | 19 Q