3v4l.org

run code in 300+ PHP versions simultaneously
<?php function funcThatReturnsArray() { return range('A', 'Z'); } $lastElement = end((funcThatReturnsArray())); var_dump($lastElement);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G5p0c
function name:  (null)
number of ops:  10
compiled vars:  !0 = $lastElement
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'end'
          1        INIT_FCALL                                               'functhatreturnsarray'
          2        DO_FCALL                                      0  $1      
          3        SEND_VAR_NO_REF                               0          $1
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !0, $2
    6     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function functhatreturnsarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G5p0c
function name:  funcThatReturnsArray
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 'A'
          2        SEND_VAL                                                 'Z'
          3        DO_ICALL                                         $0      
          4      > RETURN                                                   $0
          5*     > RETURN                                                   null

End of function functhatreturnsarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.04 ms | 1397 KiB | 20 Q