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";
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
На вашем счету ноль рублей
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 На вашем счету ноль рублей

preferences:
182.71 ms | 402 KiB | 182 Q