3v4l.org

run code in 300+ PHP versions simultaneously
<?php $address_input = "555 Test Drive, Johannesburg, South Africa"; if(substr_count($address_input, ",") >1){ $address = substr($address_input, strpos($address_input, ",")+2); } echo $address;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/gGWSR
function name:  (null)
number of ops:  19
compiled vars:  !0 = $address_input, !1 = $address
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '555+Test+Drive%2C+Johannesburg%2C+South+Africa'
    4     1        INIT_FCALL                                               'substr_count'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%2C'
          4        DO_ICALL                                         $3      
          5        IS_SMALLER                                               1, $3
          6      > JMPZ                                                     ~4, ->17
    5     7    >   INIT_FCALL                                               'substr'
          8        SEND_VAR                                                 !0
          9        INIT_FCALL                                               'strpos'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 '%2C'
         12        DO_ICALL                                         $5      
         13        ADD                                              ~6      $5, 2
         14        SEND_VAL                                                 ~6
         15        DO_ICALL                                         $7      
         16        ASSIGN                                                   !1, $7
    8    17    >   ECHO                                                     !1
    9    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.21 ms | 1012 KiB | 16 Q