3v4l.org

run code in 300+ PHP versions simultaneously
<?php $model = "Mozilla/5.0 (Linux; Android 4.1.2; GT-I9100 Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.94 Mobile Safari/537.36"; for ($i = 0; $i < 100; $i ++){ print_r(get_android_version()); } function get_android_version(){ $major = (mt_rand(0, 1) == 0) ? 2 : 4; $minor = mt_rand(0, 3); $build = 0; if (!(($major == 4) && ($minor == 3))){ $build = mt_rand(0, 3); } return $major . "" . $minor . "" . $build; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
Branch analysis from position: 3
filename:       /in/Dlp04
function name:  (null)
number of ops:  12
compiled vars:  !0 = $model, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Mozilla%2F5.0+%28Linux%3B+Android+4.1.2%3B+GT-I9100+Build%2FJZO54K%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F28.0.1500.94+Mobile+Safari%2F537.36'
    5     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->9
    6     3    >   INIT_FCALL                                               'print_r'
          4        INIT_FCALL_BY_NAME                                       'get_android_version'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
    5     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, 100
         10      > JMPNZ                                                    ~7, ->3
   16    11    > > RETURN                                                   1

Function get_android_version:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 46) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 20
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
Branch analysis from position: 20
filename:       /in/Dlp04
function name:  get_android_version
number of ops:  33
compiled vars:  !0 = $major, !1 = $minor, !2 = $build
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'mt_rand'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 1
          3        DO_ICALL                                         $3      
          4        IS_EQUAL                                                 $3, 0
          5      > JMPZ                                                     ~4, ->8
          6    >   QM_ASSIGN                                        ~5      2
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~5      4
          9    >   ASSIGN                                                   !0, ~5
   10    10        INIT_FCALL                                               'mt_rand'
         11        SEND_VAL                                                 0
         12        SEND_VAL                                                 3
         13        DO_ICALL                                         $7      
         14        ASSIGN                                                   !1, $7
   11    15        ASSIGN                                                   !2, 0
   12    16        IS_EQUAL                                         ~10     !0, 4
         17      > JMPZ_EX                                          ~10     ~10, ->20
         18    >   IS_EQUAL                                         ~11     !1, 3
         19        BOOL                                             ~10     ~11
         20    >   BOOL_NOT                                         ~12     ~10
         21      > JMPZ                                                     ~12, ->27
   13    22    >   INIT_FCALL                                               'mt_rand'
         23        SEND_VAL                                                 0
         24        SEND_VAL                                                 3
         25        DO_ICALL                                         $13     
         26        ASSIGN                                                   !2, $13
   15    27    >   CONCAT                                           ~15     !0, ''
         28        CONCAT                                           ~16     ~15, !1
         29        CONCAT                                           ~17     ~16, ''
         30        CONCAT                                           ~18     ~17, !2
         31      > RETURN                                                   ~18
   16    32*     > RETURN                                                   null

End of function get_android_version

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.38 ms | 1392 KiB | 17 Q