3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Math{ //两个数值比较大小. public function Max($a,$b) { return $a>$b?$a:$b; } //三个数值比较大小. public function Max3($a,$b,$c) { $a = $this->Max($a,$b); return $this->Max($a,$c); } } $math = new Math(); echo "最大值是 ".$math->Max3(99,100,88); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C2LOG
function name:  (null)
number of ops:  11
compiled vars:  !0 = $math
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Math'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'Max3'
          4        SEND_VAL_EX                                              99
          5        SEND_VAL_EX                                              100
          6        SEND_VAL_EX                                              88
          7        DO_FCALL                                      0  $4      
          8        CONCAT                                           ~5      '%E6%9C%80%E5%A4%A7%E5%80%BC%E6%98%AF+', $4
          9        ECHO                                                     ~5
   17    10      > RETURN                                                   1

Class Math:
Function max:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C2LOG
function name:  Max
number of ops:  9
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        IS_SMALLER                                               !1, !0
          3      > JMPZ                                                     ~2, ->6
          4    >   QM_ASSIGN                                        ~3      !0
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      !1
          7    > > RETURN                                                   ~3
    7     8*     > RETURN                                                   null

End of function max

Function max3:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C2LOG
function name:  Max3
number of ops:  14
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   11     3        INIT_METHOD_CALL                                         'Max'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $3      
          7        ASSIGN                                                   !0, $3
   12     8        INIT_METHOD_CALL                                         'Max'
          9        SEND_VAR_EX                                              !0
         10        SEND_VAR_EX                                              !2
         11        DO_FCALL                                      0  $5      
         12      > RETURN                                                   $5
   13    13*     > RETURN                                                   null

End of function max3

End of class Math.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.61 ms | 1399 KiB | 13 Q