3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GetLongestString() { $args = func_get_args(); $max = 0; $str = ""; foreach($args as $arg) { if(strlen($arg) > $max) { $str = $arg; } } return $str; } print GetLongestString("a", "bcd", "efgh", "ij", "") ;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0e5gW
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'getlongeststring'
          1        SEND_VAL                                                 'a'
          2        SEND_VAL                                                 'bcd'
          3        SEND_VAL                                                 'efgh'
          4        SEND_VAL                                                 'ij'
          5        SEND_VAL                                                 ''
          6        DO_FCALL                                      0  $0      
          7        ECHO                                                     $0
          8      > RETURN                                                   1

Function getlongeststring:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/0e5gW
function name:  GetLongestString
number of ops:  14
compiled vars:  !0 = $args, !1 = $max, !2 = $str, !3 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FUNC_GET_ARGS                                    ~4      
          1        ASSIGN                                                   !0, ~4
    4     2        ASSIGN                                                   !1, 0
    5     3        ASSIGN                                                   !2, ''
    6     4      > FE_RESET_R                                       $8      !0, ->11
          5    > > FE_FETCH_R                                               $8, !3, ->11
    7     6    >   STRLEN                                           ~9      !3
          7        IS_SMALLER                                               !1, ~9
          8      > JMPZ                                                     ~10, ->10
    8     9    >   ASSIGN                                                   !2, !3
    6    10    > > JMP                                                      ->5
         11    >   FE_FREE                                                  $8
   11    12      > RETURN                                                   !2
   12    13*     > RETURN                                                   null

End of function getlongeststring

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.98 ms | 1399 KiB | 14 Q