3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = explode('/', 'auth/signin.json'); $tail = end($arr); $dot = strpos($tail, '.'); var_dump($tail, $dot); var_dump(substr($tail, 0, $dot));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i6PkC
function name:  (null)
number of ops:  27
compiled vars:  !0 = $arr, !1 = $tail, !2 = $dot
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '%2F'
          2        SEND_VAL                                                 'auth%2Fsignin.json'
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    5     5        INIT_FCALL                                               'end'
          6        SEND_REF                                                 !0
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
    7     9        INIT_FCALL                                               'strpos'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 '.'
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !2, $7
    9    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
   11    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'substr'
         20        SEND_VAR                                                 !1
         21        SEND_VAL                                                 0
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                         $10     
         24        SEND_VAR                                                 $10
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.39 ms | 1395 KiB | 23 Q