3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$bodytag = str_ireplace("kč", "Koruna", "10 KČ"); //echo $bodytag; $CURRENCY_MAP = [ '€' => 'EUR', 'euros' => 'EUR', 'euro' => 'EUR', '$' => 'USD', '£' => 'GBP', 'kč' => 'CZK', 'ft' => 'HUF', 'zł' => 'PLN', ]; $input = '10 KČ'; foreach ($CURRENCY_MAP as $key => $value) { $input = mb_eregi_replace(preg_quote($key), $value, $input); } echo $input; // //$input = mb_strtolower('10 Euros', 'utf-8'); // //var_dump(str_replace(array_keys($CURRENCY_MAP), array_values($CURRENCY_MAP), $input)); //$starDate = new \DateTimeImmutable('2023-02-12'); //$endDate = new \DateTimeImmutable('2023-02-12', new \DateTimeZone('UTC')); //var_dump($starDate); //var_dump($endDate); // //if ($starDate <= $endDate) { // print_r('dddd'); //} ///////////////////////////////// //$dateTime = new \DateTimeImmutable(); //var_dump($dateTime); //$a = $dateTime->setTimezone(new DateTimeZone('Asia/Tokyo')); //var_dump($a); // //echo 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvv'; //$dateTime = (new \DateTimeImmutable('2012-01-27')); //var_dump($dateTime); //$a = $dateTime->setTimezone(new DateTimeZone('Europe/Prague')); //var_dump($a); //$matches = []; //$result = preg_match('~^(?P<prefix>\d+)(?P<suffix>\d{4})$~', '131-51528151810300', $matches, 0, 0); //$startDate = new \DateTimeImmutable('2024-01-12'); //$now = new \DateTimeImmutable('2024-08-13'); // //$x = $startDate->diff($now); //var_dump($x); // //if ($x->days >= 22) { // echo 'lllllllll'; //} else { // echo 'vvvv'; //} ///////////////////// //class A { // public function getDonationFioMatches() // { // return []; // } //} // //$fioTransaction = new A(); // //$xx = $fioTransaction->getDonationFioMatches()[0]?->getWireTransfer(); // //if ($xx === null) { // echo 'aaanoo'; //} /////////////////////////////// //if (1) { // var_dump(trim(' ')); //}
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/6f8N3
function name:  (null)
number of ops:  18
compiled vars:  !0 = $CURRENCY_MAP, !1 = $input, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
   18     1        ASSIGN                                                   !1, '10+K%C4%8C'
   20     2      > FE_RESET_R                                       $6      !0, ->15
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->15
          4    >   ASSIGN                                                   !3, ~7
   21     5        INIT_FCALL                                               'mb_eregi_replace'
          6        INIT_FCALL                                               'preg_quote'
          7        SEND_VAR                                                 !3
          8        DO_ICALL                                         $9      
          9        SEND_VAR                                                 $9
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !1, $10
   20    14      > JMP                                                      ->3
         15    >   FE_FREE                                                  $6
   24    16        ECHO                                                     !1
   92    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.09 ms | 1011 KiB | 15 Q