3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Point { public $X; public $Y; function __construct($X, $Y) { $this->X = $X; $this->Y = $Y; } } $moves = 10; $mouseX = 200; $mouseY = 200; $point = new Point(300, 300); $delta = 1/(1-rand(0, 99)/100); if (rand(0, 1) == 0) { $delta = 1/$delta; } $xCoefs = array($delta); for ( $i=1; $i<=$moves; $i++ ) { $xCoefs[$i] = $xCoefs[$i-1] - ($delta - 1/$delta)/$moves; } $points = array(new Point($mouseX, $mouseY)); for ( $i=1; $i<=$moves; $i++ ) { $x = $points[$i-1]->X + ($point->X - $mouseX)*$xCoefs[$i]/$moves; $y = $points[$i-1]->Y + ($point->Y - $mouseY)/$moves; echo $x.';'.$y.' (coef '.$xCoefs[$i].')'; $points[] = new Point($x, $y); } var_dump($points);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.2.00.0030.01019.42
7.1.70.0040.00416.92
7.1.60.0100.01319.46
7.1.50.0120.00916.66
7.1.00.0100.06722.45
7.0.200.0020.00516.88
7.0.140.0100.07022.09
7.0.60.0030.08719.91
7.0.50.0130.08017.91
7.0.40.0070.07320.15
7.0.30.0230.06020.16
7.0.20.0200.04320.27
7.0.10.0000.09020.09
7.0.00.0200.07020.10
5.6.210.0070.08320.48
5.6.200.0000.06318.13
5.6.190.0030.05020.39
5.6.180.0200.09020.46
5.6.170.0170.04020.71
5.6.160.0070.04020.39
5.6.150.0000.06018.23
5.6.140.0070.08018.12
5.6.130.0070.07018.24
5.6.120.0070.08721.03
5.6.110.0030.06721.01
5.6.100.0030.07320.90
5.6.90.0100.05321.04
5.6.80.0030.08720.41
5.6.70.4300.03320.40
5.5.350.0130.08020.44
5.5.340.0070.04017.94
5.5.330.0000.04320.36
5.5.320.0030.04320.20
5.5.310.0230.07720.37
5.5.300.0200.06717.97
5.5.290.0070.03718.04
5.5.280.0000.06320.78
5.5.270.0100.03320.88
5.5.260.0100.07720.88
5.5.250.0030.05720.48
5.5.240.0300.07320.29
5.4.450.0900.05319.45
5.4.440.0900.05719.30
5.4.430.0330.05019.19
5.4.420.0900.05019.47
5.4.410.0700.04719.52
5.4.400.0700.05718.99
5.4.390.0800.05719.01
5.4.380.0330.05718.74
5.4.370.0230.05018.70
5.4.360.0230.05018.78
5.4.350.0300.05018.50
5.4.340.0330.05718.77
5.4.320.0060.03712.52
5.4.310.0140.03912.51
5.4.300.0030.03912.52
5.4.290.0100.03312.51
5.4.280.0160.04312.38
5.4.270.0100.04612.39
5.4.260.0110.05612.38
5.4.250.0100.05112.39
5.4.240.0070.05312.39
5.4.230.0100.05312.38
5.4.220.0100.05412.38
5.4.210.0130.04712.38
5.4.200.0070.05512.38
5.4.190.0060.05612.38
5.4.180.0110.05712.38
5.4.170.0110.05712.39
5.4.160.0130.05012.39
5.4.150.0100.06112.38
5.4.140.0140.06412.06
5.4.130.0110.05112.05
5.4.120.0110.05512.01
5.4.110.0080.06212.01
5.4.100.0140.05212.00
5.4.90.0080.06412.00
5.4.80.0150.06112.00
5.4.70.0190.06812.00
5.4.60.0100.05212.00
5.4.50.0160.06212.00
5.4.40.0170.05211.99
5.4.30.0160.06111.98
5.4.20.0150.05211.99
5.4.10.0130.05311.98
5.4.00.0070.06311.48
5.3.290.0060.04012.80
5.3.280.0100.05912.70
5.3.270.0110.06912.72
5.3.260.0100.06212.71
5.3.250.0120.06112.72
5.3.240.0160.05612.72
5.3.230.0110.05512.70
5.3.220.0160.05712.68
5.3.210.0150.05612.68
5.3.200.0090.06112.68
5.3.190.0150.05412.68
5.3.180.0090.06012.67
5.3.170.0120.05912.67
5.3.160.0120.05212.68
5.3.150.0110.05512.68
5.3.140.0140.05212.66
5.3.130.0130.05612.66
5.3.120.0110.05812.66
5.3.110.0120.05312.66
5.3.100.0110.05112.13
5.3.90.0160.05112.11
5.3.80.0200.04312.09
5.3.70.0070.05612.09
5.3.60.0100.04912.08
5.3.50.0090.05512.03
5.3.40.0140.05212.03
5.3.30.0150.05111.98
5.3.20.0140.04711.76
5.3.10.0150.05011.73
5.3.00.0200.04711.72
5.2.170.0140.0429.22
5.2.160.0130.0459.22
5.2.150.0100.0459.22
5.2.140.0080.0469.21
5.2.130.0060.0459.18
5.2.120.0070.0419.17
5.2.110.0120.0329.18
5.2.100.0110.0439.18
5.2.90.0070.0409.18
5.2.80.0120.0349.17
5.2.70.0090.0339.17
5.2.60.0060.0399.12
5.2.50.0100.0379.10
5.2.40.0080.0379.07
5.2.30.0100.0449.05
5.2.20.0260.0759.03
5.2.10.0110.0458.96
5.2.00.0210.0558.83
5.1.60.0050.0448.11
5.1.50.0070.0388.11
5.1.40.0160.0458.09
5.1.30.0220.0678.44
5.1.20.0130.0508.46
5.1.10.0140.0638.19
5.1.00.0100.0368.19
5.0.50.0110.0346.68
5.0.40.0070.0306.53
5.0.30.0080.0436.35
5.0.20.0070.0316.31
5.0.10.0090.0306.29
5.0.00.0120.0436.29
4.4.90.0070.0164.78
4.4.80.0030.0184.76
4.4.70.0080.0164.75
4.4.60.0050.0194.75
4.4.50.0040.0234.77
4.4.40.0030.0364.71
4.4.30.0040.0224.76
4.4.20.0060.0224.84
4.4.10.0050.0234.85
4.4.00.0040.0344.76
4.3.110.0030.0304.67
4.3.100.0050.0264.67
4.3.90.0050.0264.63
4.3.80.0080.0374.58
4.3.70.0100.0214.63
4.3.60.0040.0254.63
4.3.50.0050.0284.63
4.3.40.0090.0414.54
4.3.30.0080.0333.28
4.3.20.0100.0303.27
4.3.10.0090.0263.23
4.3.00.0000.01310.30

preferences:
39.74 ms | 401 KiB | 5 Q