3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GetLongestString() { $args = func_get_args(); return max(array_map('strlen', $args)); } echo GetLongestString("a", "aaa", "aa") . PHP_EOL; echo GetLongestString("a", "bcd", "efgh", "") . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aXOZW
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'getlongeststring'
          1        SEND_VAL                                                 'a'
          2        SEND_VAL                                                 'aaa'
          3        SEND_VAL                                                 'aa'
          4        DO_FCALL                                      0  $0      
          5        CONCAT                                           ~1      $0, '%0A'
          6        ECHO                                                     ~1
   10     7        INIT_FCALL                                               'getlongeststring'
          8        SEND_VAL                                                 'a'
          9        SEND_VAL                                                 'bcd'
         10        SEND_VAL                                                 'efgh'
         11        SEND_VAL                                                 ''
         12        DO_FCALL                                      0  $2      
         13        CONCAT                                           ~3      $2, '%0A'
         14        ECHO                                                     ~3
         15      > RETURN                                                   1

Function getlongeststring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aXOZW
function name:  GetLongestString
number of ops:  11
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FUNC_GET_ARGS                                    ~1      
          1        ASSIGN                                                   !0, ~1
    6     2        INIT_FCALL                                               'max'
          3        INIT_FCALL                                               'array_map'
          4        SEND_VAL                                                 'strlen'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9      > RETURN                                                   $4
    7    10*     > RETURN                                                   null

End of function getlongeststring

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
215.43 ms | 1402 KiB | 19 Q