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 . "`is'"); } $nums = array(); foreach (range(1, 26) as $num) { $nums[] = $num; } $val = strtolower($val); //die(preg_replace('`asda`is', 123, 'this bullasda')); $ret = preg_replace($lets, $nums, $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/SinuM
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
   25     3        INIT_FCALL                                               'getnumber'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $4      
          6        ASSIGN                                                   !1, $4
   27     7        ECHO                                                     '%3Cpre%3E'
   29     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
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 24
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Branch analysis from position: 13
filename:       /in/SinuM
function name:  getNumber
number of ops:  43
compiled vars:  !0 = $val, !1 = $lets, !2 = $let, !3 = $nums, !4 = $num, !5 = $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                                         $7      
          6      > FE_RESET_R                                       $8      $7, ->13
          7    > > FE_FETCH_R                                               $8, !2, ->13
    8     8    >   CONCAT                                           ~10     '%27%60', !2
          9        CONCAT                                           ~11     ~10, '%60is%27'
         10        ASSIGN_DIM                                               !1
         11        OP_DATA                                                  ~11
    7    12      > JMP                                                      ->7
         13    >   FE_FREE                                                  $8
   11    14        ASSIGN                                                   !3, <array>
   12    15        INIT_FCALL                                               'range'
         16        SEND_VAL                                                 1
         17        SEND_VAL                                                 26
         18        DO_ICALL                                         $13     
         19      > FE_RESET_R                                       $14     $13, ->24
         20    > > FE_FETCH_R                                               $14, !4, ->24
   13    21    >   ASSIGN_DIM                                               !3
         22        OP_DATA                                                  !4
   12    23      > JMP                                                      ->20
         24    >   FE_FREE                                                  $14
   15    25        INIT_FCALL                                               'strtolower'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                         $16     
         28        ASSIGN                                                   !0, $16
   19    29        INIT_FCALL                                               'preg_replace'
         30        SEND_VAR                                                 !1
         31        SEND_VAR                                                 !3
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                         $18     
         34        ASSIGN                                                   !5, $18
   20    35        INIT_FCALL                                               'substr'
         36        SEND_VAR                                                 !5
         37        SEND_VAL                                                 0
         38        SEND_VAL                                                 10
         39        DO_ICALL                                         $20     
         40        ASSIGN                                                   !5, $20
   22    41      > RETURN                                                   !5
   23    42*     > RETURN                                                   null

End of function getnumber

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.7 ms | 1403 KiB | 26 Q