3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '5e Dorpsstraat41-B'; $matchArr = array(); preg_match_all('/(\d+)/', $string, $matchArr); $houseNumber = array_pop($matchArr[0]); $houseNumberStartPos = strrpos($address, $houseNumber); $streetName = substr(0, $houseNumberStartPos, $address); print $streetName;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/seL53
function name:  (null)
number of ops:  25
compiled vars:  !0 = $string, !1 = $matchArr, !2 = $houseNumber, !3 = $houseNumberStartPos, !4 = $address, !5 = $streetName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '5e+Dorpsstraat41-B'
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%28%5Cd%2B%29%2F'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'array_pop'
          8        FETCH_DIM_W                                      $9      !1, 0
          9        SEND_REF                                                 $9
         10        DO_ICALL                                         $10     
         11        ASSIGN                                                   !2, $10
    7    12        INIT_FCALL                                               'strrpos'
         13        SEND_VAR                                                 !4
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $12     
         16        ASSIGN                                                   !3, $12
    8    17        INIT_FCALL                                               'substr'
         18        SEND_VAL                                                 0
         19        SEND_VAR                                                 !3
         20        SEND_VAR                                                 !4
         21        DO_ICALL                                         $14     
         22        ASSIGN                                                   !5, $14
    9    23        ECHO                                                     !5
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.91 ms | 1395 KiB | 21 Q