<?php
echo "++i ";
$start = microtime(true);
for ($i = 0; $i < 100000000; ++$i);
$delta_pre = microtime(true) - $start;
printf('%.4F', $delta_pre);
echo PHP_EOL;
echo "i++ ";
$start = microtime(true);
for ($i = 0; $i < 100000000; $i++);
$delpa_post = microtime(true) - $start;
printf('%.4F', $delpa_post);
echo PHP_EOL;
echo PHP_EOL;
printf('%.2F', $delta_pre / $delpa_post * 100);
echo "%", PHP_EOL;
- Output for 7.2.0
- ++i 0.4986
i++ 0.7572
65.85%
- Output for 7.1.7
- ++i 0.6087
i++ 0.8500
71.61%
- Output for 7.1.6
- ++i 0.5506
i++ 0.7283
75.60%
- Output for 7.1.5
- ++i 0.5930
i++ 0.7208
82.27%
- Output for 7.1.0
- ++i 0.5765
i++ 0.7384
78.06%
- Output for 7.0.20
- ++i 0.6856
i++ 0.9927
69.06%
- Output for 7.0.14
- ++i 0.5390
i++ 0.7385
72.99%
- Output for 7.0.6
- ++i 0.6353
i++ 0.7888
80.54%
- Output for 7.0.5
- ++i 0.6416
i++ 0.7835
81.88%
- Output for 7.0.4
- ++i 0.6141
i++ 0.9385
65.44%
- Output for 7.0.3
- ++i 0.4999
i++ 0.7830
63.85%
- Output for 7.0.2
- ++i 0.5093
i++ 0.7809
65.22%
- Output for 7.0.1
- ++i 0.6184
i++ 0.8512
72.65%
- Output for 7.0.0
- ++i 0.5410
i++ 0.7264
74.47%
- Output for 5.6.28
- ++i 1.3064
i++
Process exited with code 137. - Output for 5.6.21
- ++i 1.6894
i++
Process exited with code 137. - Output for 5.6.20
- ++i 2.0308
i++
Process exited with code 137. - Output for 5.6.19
- ++i 1.7069
i++
Process exited with code 137. - Output for 5.6.18
- ++i 1.6776
i++
Process exited with code 137. - Output for 5.6.17
- ++i 1.8107
i++
Process exited with code 137. - Output for 5.6.16
- ++i 1.7059
i++
Process exited with code 137. - Output for 5.6.15
- ++i 1.8487
i++
Process exited with code 137. - Output for 5.6.14
- ++i 1.7091
i++
Process exited with code 137. - Output for 5.6.13
- ++i 1.6903
i++
Process exited with code 137. - Output for 5.6.12
- ++i 1.6880
i++
Process exited with code 137. - Output for 5.6.11
- ++i 1.7192
i++
Process exited with code 137. - Output for 5.6.10
- ++i 1.7308
i++
Process exited with code 137. - Output for 5.6.9
- ++i 1.7129
i++
Process exited with code 137. - Output for 5.6.8
- ++i 1.7419
i++
Process exited with code 137. - Output for 5.6.7
- ++i 1.4850
i++
Process exited with code 137. - Output for 5.5.35
- ++i 1.6003
i++
Process exited with code 137. - Output for 5.5.34
- ++i 1.6720
i++
Process exited with code 137. - Output for 5.5.33
- ++i 1.7145
i++
Process exited with code 137. - Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.30, 5.4.34 - 5.4.44, 5.5.24 - 5.5.25, 5.5.27 - 5.5.28, 5.5.32
- ++i
Process exited with code 137. - Output for 5.5.31
- ++i 1.7228
i++
Process exited with code 137. - Output for 5.5.30
- ++i 1.6785
i++
Process exited with code 137. - Output for 5.5.29
- ++i 1.7022
i++
Process exited with code 137. - Output for 5.5.26
- ++i 1.7420
i++
Process exited with code 137. - Output for 5.4.45
- ++i 1.6226
i++
Process exited with code 137. - Output for 5.4.32
- ++i 1.8583
i++
Process exited with code 137. - Output for 5.4.31
- ++i 1.8572
i++
Process exited with code 137.
preferences:
142.68 ms | 401 KiB | 175 Q