3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); mb_internal_encoding('utf-8'); /* Возвращает соответствующую числу форму слова: 1 рубль, 2 рубля, 5 рублей */ function inclineWord($number, $word1, $word2, $word5) { /* DIY */ } function smallNumberToText($number, $isFemale) { $spelling = array( 0 => 'ноль', 10 => 'десять', 100 => 'сто', 1 => 'один', 11 => 'одиннадцать', 20 => 'двадцать', 200 => 'двести', 2 => 'два', 12 => 'двенадцать', 30 => 'тридцать', 300 => 'триста', 3 => 'три', 13 => 'тринадцать', 40 => 'сорок', 400 => 'четыреста', 4 => 'четыре', 14 => 'четырнадцать', 50 => 'пятьдесят', 500 => 'пятьсот', 5 => 'пять', 15 => 'пятнадцать', 60 => 'шестьдесят', 600 => 'шестьсот', 6 => 'шесть', 16 => 'шестнадцать', 70 => 'семьдесят', 700 => 'семьсот', 7 => 'семь', 17 => 'семнадцать', 80 => 'восемьдесят', 800 => 'восемьсот', 8 => 'восемь', 18 => 'восемнадцать', 90 => 'девяносто', 900 => 'девятьсот', 9 => 'девять', 19 => 'девятнадцать' ); $femaleSpelling = array( 1 => 'одна', 2 => 'две' ); if ($number == 0) { return "ноль рублей"; } echo "Соси хуй, быдло\n"; } function numberToText($number) { $text = ""; $text = smallNumberToText($number, 1); return $text; } /* Вызовем функцию несколько раз */ //$amount1 = mt_rand(1,99999999); $amount1 = 0; $text1 = numberToText($amount1); echo "На вашем счету {$text1}\n"; //$amount2 = mt_rand(1,99999999); //$text2 = numberToText($amount2); //echo "На вашем счету {$text2}\n"; //$amount3 = mt_rand(1,99999999); //$text3 = numberToText($amount3); //echo "На вашем счету {$text3}\n"; //$amount4 = mt_rand(1,99999999); //$text4 = numberToText($amount4); //echo "На вашем счету {$text4}\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fhmok
function name:  (null)
number of ops:  16
compiled vars:  !0 = $amount1, !1 = $text1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
    4     3        INIT_FCALL                                               'mb_internal_encoding'
          4        SEND_VAL                                                 'utf-8'
          5        DO_ICALL                                                 
   48     6        ASSIGN                                                   !0, 0
   49     7        INIT_FCALL                                               'numbertotext'
          8        SEND_VAR                                                 !0
          9        DO_FCALL                                      0  $5      
         10        ASSIGN                                                   !1, $5
   51    11        ROPE_INIT                                     3  ~8      '%D0%9D%D0%B0+%D0%B2%D0%B0%D1%88%D0%B5%D0%BC+%D1%81%D1%87%D0%B5%D1%82%D1%83+'
         12        ROPE_ADD                                      1  ~8      ~8, !1
         13        ROPE_END                                      2  ~7      ~8, '%0A'
         14        ECHO                                                     ~7
   66    15      > RETURN                                                   1

Function inclineword:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fhmok
function name:  inclineWord
number of ops:  5
compiled vars:  !0 = $number, !1 = $word1, !2 = $word2, !3 = $word5
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   10     4      > RETURN                                                   null

End of function inclineword

Function smallnumbertotext:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fhmok
function name:  smallNumberToText
number of ops:  9
compiled vars:  !0 = $number, !1 = $isFemale, !2 = $spelling, !3 = $femaleSpelling
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        ASSIGN                                                   !2, <array>
   27     3        ASSIGN                                                   !3, <array>
   31     4        IS_EQUAL                                                 !0, 0
          5      > JMPZ                                                     ~6, ->7
   32     6    > > RETURN                                                   '%D0%BD%D0%BE%D0%BB%D1%8C+%D1%80%D1%83%D0%B1%D0%BB%D0%B5%D0%B9'
   35     7    >   ECHO                                                     '%D0%A1%D0%BE%D1%81%D0%B8+%D1%85%D1%83%D0%B9%2C+%D0%B1%D1%8B%D0%B4%D0%BB%D0%BE%0A'
   36     8      > RETURN                                                   null

End of function smallnumbertotext

Function numbertotext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fhmok
function name:  numberToText
number of ops:  9
compiled vars:  !0 = $number, !1 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
   40     1        ASSIGN                                                   !1, ''
   41     2        INIT_FCALL                                               'smallnumbertotext'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 1
          5        DO_FCALL                                      0  $3      
          6        ASSIGN                                                   !1, $3
   42     7      > RETURN                                                   !1
   44     8*     > RETURN                                                   null

End of function numbertotext

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.86 ms | 1394 KiB | 19 Q