3v4l.org

run code in 300+ PHP versions simultaneously
<?php $standardPrice = 77.88; $specialPrices = array( "54.44" => "20130515163000-20130515170000", "4.88" => "20130515170000-20130515190000", "5.00" => "20130515200000-20130515200045" ); //json_decode('{"54.44":"20130515163000-20130515170000","4.88":"20130515170000-20130515190000","5.00":"20130515200000-20130515200045"}'); function currentPrice($standardPrice, $specialPrices) { if (empty($specialPrices)) { return $standardPrice; } $now = strftime('%Y%m%d%H%M%S'); return $standardPrice; }; echo currentPrice($standardPrice, $specialPrices);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vA0WF
function name:  (null)
number of ops:  8
compiled vars:  !0 = $standardPrice, !1 = $specialPrices
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 77.88
    5     1        ASSIGN                                                   !1, <array>
   32     2        INIT_FCALL                                               'currentprice'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

Function currentprice:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vA0WF
function name:  currentPrice
number of ops:  11
compiled vars:  !0 = $standardPrice, !1 = $specialPrices, !2 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        ISSET_ISEMPTY_CV                                         !1
          3      > JMPZ                                                     ~3, ->5
   17     4    > > RETURN                                                   !0
   21     5    >   INIT_FCALL                                               'strftime'
          6        SEND_VAL                                                 '%25Y%25m%25d%25H%25M%25S'
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !2, $4
   28     9      > RETURN                                                   !0
   30    10*     > RETURN                                                   null

End of function currentprice

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.04 ms | 1389 KiB | 16 Q