3v4l.org

run code in 300+ PHP versions simultaneously
<?php $need_score = 248; $timestamp = 1441011021; $current_score = 0.7; $date_now = new DateTime(); $date = new DateTime(); $date->setTimestamp($timestamp); $interval_days = $date_now->diff($date)->days + 1; print ($need_score - $current_score) * $interval_days;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L0Ku9
function name:  (null)
number of ops:  22
compiled vars:  !0 = $need_score, !1 = $timestamp, !2 = $current_score, !3 = $date_now, !4 = $date, !5 = $interval_days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 248
    4     1        ASSIGN                                                   !1, 1441011021
    5     2        ASSIGN                                                   !2, 0.7
    7     3        NEW                                              $9      'DateTime'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !3, $9
    8     6        NEW                                              $12     'DateTime'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !4, $12
    9     9        INIT_METHOD_CALL                                         !4, 'setTimestamp'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
   10    12        INIT_METHOD_CALL                                         !3, 'diff'
         13        SEND_VAR_EX                                              !4
         14        DO_FCALL                                      0  $16     
         15        FETCH_OBJ_R                                      ~17     $16, 'days'
         16        ADD                                              ~18     ~17, 1
         17        ASSIGN                                                   !5, ~18
   12    18        SUB                                              ~20     !0, !2
         19        MUL                                              ~21     !5, ~20
         20        ECHO                                                     ~21
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.58 ms | 1385 KiB | 13 Q