3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = uniqid(); function getNumber($val) { $lets = array(); foreach (range('a', 'z') as $let) { $lets[] = ("'`" . $let . "`'"); } $num = range(1, 26); $val = strtolower($val); $ret = preg_replace($lets, $num, $val); $ret = substr($ret, 0, 10); return $ret; } $b = getNumber($a); echo "<pre>"; var_dump($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PPCpv
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'uniqid'
          1        DO_ICALL                                         $2      
          2        ASSIGN                                                   !0, $2
   20     3        INIT_FCALL                                               'getnumber'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $4      
          6        ASSIGN                                                   !1, $4
   22     7        ECHO                                                     '%3Cpre%3E'
   24     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function getnumber:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/PPCpv
function name:  getNumber
number of ops:  37
compiled vars:  !0 = $val, !1 = $lets, !2 = $let, !3 = $num, !4 = $ret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, <array>
    7     2        INIT_FCALL                                               'range'
          3        SEND_VAL                                                 'a'
          4        SEND_VAL                                                 'z'
          5        DO_ICALL                                         $6      
          6      > FE_RESET_R                                       $7      $6, ->13
          7    > > FE_FETCH_R                                               $7, !2, ->13
    8     8    >   CONCAT                                           ~9      '%27%60', !2
          9        CONCAT                                           ~10     ~9, '%60%27'
         10        ASSIGN_DIM                                               !1
         11        OP_DATA                                                  ~10
    7    12      > JMP                                                      ->7
         13    >   FE_FREE                                                  $7
   11    14        INIT_FCALL                                               'range'
         15        SEND_VAL                                                 1
         16        SEND_VAL                                                 26
         17        DO_ICALL                                         $11     
         18        ASSIGN                                                   !3, $11
   12    19        INIT_FCALL                                               'strtolower'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $13     
         22        ASSIGN                                                   !0, $13
   14    23        INIT_FCALL                                               'preg_replace'
         24        SEND_VAR                                                 !1
         25        SEND_VAR                                                 !3
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                         $15     
         28        ASSIGN                                                   !4, $15
   15    29        INIT_FCALL                                               'substr'
         30        SEND_VAR                                                 !4
         31        SEND_VAL                                                 0
         32        SEND_VAL                                                 10
         33        DO_ICALL                                         $17     
         34        ASSIGN                                                   !4, $17
   17    35      > RETURN                                                   !4
   18    36*     > RETURN                                                   null

End of function getnumber

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.34 ms | 1403 KiB | 26 Q