3v4l.org

run code in 500+ PHP versions simultaneously
<?php function getCPU(){ $name = php_uname('m'); //workaround bug if(strlen($name) > 20 AND stripos($name,'linux') !== false){ $name = `uname -m`; } return trim($name); } var_dump(getCPU());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PpaIbM
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                                   'var_dump'
          1        INIT_FCALL                                                   'getcpu'
          2        DO_FCALL                                          0  $0      
          3        SEND_VAR                                                     $0
          4        DO_ICALL                                                     
          5      > RETURN                                                       1

Function getcpu:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 13
filename:       /in/PpaIbM
function name:  getCPU
number of ops:  21
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                                   'php_uname'
          1        SEND_VAL                                                     'm'
          2        DO_ICALL                                             $1      
          3        ASSIGN                                                       !0, $1
    6     4        STRLEN                                               ~3      !0
          5        IS_SMALLER                                           ~4      20, ~3
          6      > JMPZ_EX                                              ~4      ~4, ->13
          7    >   INIT_FCALL                                                   'stripos'
          8        SEND_VAR                                                     !0
          9        SEND_VAL                                                     'linux'
         10        DO_ICALL                                             $5      
         11        TYPE_CHECK                                      1018  ~6      $5
         12        BOOL                                                 ~4      ~6
         13    > > JMPZ                                                         ~4, ->18
    7    14    >   INIT_FCALL                                                   'shell_exec'
         15        SEND_VAL                                                     'uname+-m'
         16        DO_ICALL                                             $7      
         17        ASSIGN                                                       !0, $7
    9    18    >   FRAMELESS_ICALL_1                trim                ~9      !0
         19      > RETURN                                                       ~9
   10    20*     > RETURN                                                       null

End of function getcpu

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.5 ms | 1888 KiB | 18 Q