3v4l.org

run code in 300+ PHP versions simultaneously
<?php $score = 0; $now = time(); for ($i=0; $i<10; $i++) { $time = strtotime("- " . (10 - i) . " hours"); $timeScore = 1 - (($now - $time) / $now); $score += 1/(1+exp(12*$timeScore + 12)); print_r(array('time' => $time, 'timeScore' => $timeScore, 'score' => $score)); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 6
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 6
Branch analysis from position: 35
Branch analysis from position: 6
filename:       /in/GhT5f
function name:  (null)
number of ops:  36
compiled vars:  !0 = $score, !1 = $now, !2 = $i, !3 = $time, !4 = $timeScore
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    4     1        INIT_FCALL                                               'time'
          2        DO_ICALL                                         $6      
          3        ASSIGN                                                   !1, $6
    5     4        ASSIGN                                                   !2, 0
          5      > JMP                                                      ->33
    6     6    >   INIT_FCALL                                               'strtotime'
          7        FETCH_CONSTANT                                   ~9      'i'
          8        SUB                                              ~10     10, ~9
          9        CONCAT                                           ~11     '-+', ~10
         10        CONCAT                                           ~12     ~11, '+hours'
         11        SEND_VAL                                                 ~12
         12        DO_ICALL                                         $13     
         13        ASSIGN                                                   !3, $13
    7    14        SUB                                              ~15     !1, !3
         15        DIV                                              ~16     ~15, !1
         16        SUB                                              ~17     1, ~16
         17        ASSIGN                                                   !4, ~17
    8    18        INIT_FCALL                                               'exp'
         19        MUL                                              ~19     !4, 12
         20        ADD                                              ~20     ~19, 12
         21        SEND_VAL                                                 ~20
         22        DO_ICALL                                         $21     
         23        ADD                                              ~22     1, $21
         24        DIV                                              ~23     1, ~22
         25        ASSIGN_OP                                     1          !0, ~23
    9    26        INIT_FCALL                                               'print_r'
         27        INIT_ARRAY                                       ~25     !3, 'time'
         28        ADD_ARRAY_ELEMENT                                ~25     !4, 'timeScore'
         29        ADD_ARRAY_ELEMENT                                ~25     !0, 'score'
         30        SEND_VAL                                                 ~25
         31        DO_ICALL                                                 
    5    32        PRE_INC                                                  !2
         33    >   IS_SMALLER                                               !2, 10
         34      > JMPNZ                                                    ~28, ->6
   10    35    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.23 ms | 1388 KiB | 21 Q