3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Intialize the input $score=rand(50,100); //Determine the Grade function p($a,$b) { echo $a . " >= " . $b; return $a>=$b; } $grade=(p($score,90))?'A':( p($score,80)?'B':( p($score,70)?'C':( p($score,60)?'D':'F'))); //Output the Results echo "<h1>A score of $score = $grade</h1>";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a3QEt
function name:  (null)
number of ops:  45
compiled vars:  !0 = $score, !1 = $grade
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'rand'
          1        SEND_VAL                                                 50
          2        SEND_VAL                                                 100
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    7     5        INIT_FCALL                                               'p'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 90
          8        DO_FCALL                                      0  $4      
          9      > JMPZ                                                     $4, ->12
         10    >   QM_ASSIGN                                        ~5      'A'
         11      > JMP                                                      ->37
    8    12    >   INIT_FCALL                                               'p'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 80
         15        DO_FCALL                                      0  $6      
         16      > JMPZ                                                     $6, ->19
         17    >   QM_ASSIGN                                        ~7      'B'
         18      > JMP                                                      ->36
    9    19    >   INIT_FCALL                                               'p'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 70
         22        DO_FCALL                                      0  $8      
         23      > JMPZ                                                     $8, ->26
         24    >   QM_ASSIGN                                        ~9      'C'
         25      > JMP                                                      ->35
   10    26    >   INIT_FCALL                                               'p'
         27        SEND_VAR                                                 !0
         28        SEND_VAL                                                 60
         29        DO_FCALL                                      0  $10     
         30      > JMPZ                                                     $10, ->33
         31    >   QM_ASSIGN                                        ~11     'D'
         32      > JMP                                                      ->34
         33    >   QM_ASSIGN                                        ~11     'F'
         34    >   QM_ASSIGN                                        ~9      ~11
         35    >   QM_ASSIGN                                        ~7      ~9
         36    >   QM_ASSIGN                                        ~5      ~7
    7    37    >   ASSIGN                                                   !1, ~5
   13    38        ROPE_INIT                                     5  ~14     '%3Ch1%3EA+score+of+'
         39        ROPE_ADD                                      1  ~14     ~14, !0
         40        ROPE_ADD                                      2  ~14     ~14, '+%3D+'
         41        ROPE_ADD                                      3  ~14     ~14, !1
         42        ROPE_END                                      4  ~13     ~14, '%3C%2Fh1%3E'
         43        ECHO                                                     ~13
         44      > RETURN                                                   1

Function p:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a3QEt
function name:  p
number of ops:  8
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        CONCAT                                           ~2      !0, '+%3E%3D+'
          3        CONCAT                                           ~3      ~2, !1
          4        ECHO                                                     ~3
          5        IS_SMALLER_OR_EQUAL                              ~4      !1, !0
          6      > RETURN                                                   ~4
          7*     > RETURN                                                   null

End of function p

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.04 ms | 1403 KiB | 19 Q