3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = "Gewerbe"; echo "Vor: " . $value; $value = preg_replace('/^(P|G).*$/', "$1", $value); echo "Nach: " . $value; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hrYWf
function name:  (null)
number of ops:  12
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Gewerbe'
    5     1        CONCAT                                           ~2      'Vor%3A+', !0
          2        ECHO                                                     ~2
    7     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAL                                                 '%2F%5E%28P%7CG%29.%2A%24%2F'
          5        SEND_VAL                                                 '%241'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        ASSIGN                                                   !0, $3
    9     9        CONCAT                                           ~5      'Nach%3A+', !0
         10        ECHO                                                     ~5
   11    11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.51 ms | 1394 KiB | 15 Q