3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.36 ms | 1395 KiB | 21 Q