3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '0000-0024-0055-'; $str = rtrim($str,'-'); $codes = explode('-',$str); var_dump($codes); $maxCode = (int)array_pop($codes); var_dump($maxCode);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7GoDZ
function name:  (null)
number of ops:  23
compiled vars:  !0 = $str, !1 = $codes, !2 = $maxCode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '0000-0024-0055-'
    4     1        INIT_FCALL                                               'rtrim'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '-'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !0, $4
    5     6        INIT_FCALL                                               'explode'
          7        SEND_VAL                                                 '-'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !1, $6
    6    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
    7    14        INIT_FCALL                                               'array_pop'
         15        SEND_REF                                                 !1
         16        DO_ICALL                                         $9      
         17        CAST                                          4  ~10     $9
         18        ASSIGN                                                   !2, ~10
    8    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.93 ms | 1395 KiB | 21 Q