3v4l.org

run code in 300+ PHP versions simultaneously
<?php $location = 'Boston, MA'; $comma = strpos($location,','); $city = substr($location,0,$comma); $state = substr($location,$comma); echo $city; echo '<br>'; echo $state; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BOY06
function name:  (null)
number of ops:  21
compiled vars:  !0 = $location, !1 = $comma, !2 = $city, !3 = $state
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Boston%2C+MA'
    4     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%2C'
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 0
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
    6    12        INIT_FCALL                                               'substr'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !3, $9
    7    17        ECHO                                                     !2
    8    18        ECHO                                                     '%3Cbr%3E'
    9    19        ECHO                                                     !3
   11    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.88 ms | 1395 KiB | 17 Q