3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Problem { public static function average($a, $b) { return $a + $b / 2; } } echo Problem::average(2,4);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TYXsW
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  'Problem', 'average'
          1        SEND_VAL                                                 2
          2        SEND_VAL                                                 4
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Class Problem:
Function average:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TYXsW
function name:  average
number of ops:  6
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        DIV                                              ~2      !1, 2
          3        ADD                                              ~3      !0, ~2
          4      > RETURN                                                   ~3
   10     5*     > RETURN                                                   null

End of function average

End of class Problem.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.67 ms | 1393 KiB | 13 Q