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-1); } echo $delta.' -> '.(1/$delta)."\r\n"; var_dump($xCoefs); $points = array(new Point($mouseX, $mouseY)); for ( $i=1; $i<=$moves; $i++ ) { $x = $points[$i-1]->X + ($point->X - $mouseX)*$xCoefs[$i-1]/$moves; $y = $points[$i-1]->Y + ($point->Y - $mouseY)/$moves; echo $x.';'.$y.' (coef '.$xCoefs[$i-1].')'."\r\n"; $points[] = new Point($x, $y); }

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.3.10.0110.00716.82
7.3.00.0030.00916.80
7.2.130.0140.00417.01
7.2.120.0070.01016.69
7.2.110.0120.00617.05
7.2.100.0000.01216.92
7.2.90.0070.00717.09
7.2.80.0000.01116.93
7.2.70.0070.00417.03
7.2.60.0060.00616.88
7.2.50.0060.00616.97
7.2.40.0080.00417.07
7.2.30.0120.00416.88
7.2.20.0060.00617.07
7.2.10.0000.01316.74
7.2.00.0030.01018.28
7.1.250.0030.01015.90
7.1.70.0000.00717.30
7.1.60.0130.01319.46
7.1.50.0180.00016.88
7.1.00.0030.07722.50
7.0.200.0130.00016.78
7.0.140.0030.07322.23
7.0.60.0270.07319.96
7.0.50.0130.04717.89
7.0.40.0070.07720.26
7.0.30.0400.06720.25
7.0.20.0130.04320.09
7.0.10.0100.07320.08
7.0.00.0100.05720.09
5.6.280.0000.07721.05
5.6.210.0170.07320.62
5.6.200.0130.05318.18
5.6.190.0030.08320.43
5.6.180.0300.07320.48
5.6.170.0370.07720.53
5.6.160.0100.06020.45
5.6.150.0070.08018.29
5.6.140.0030.08318.18
5.6.130.0030.08718.18
5.6.120.0070.05321.02
5.6.110.0070.06721.01
5.6.100.0070.08021.02
5.6.90.0070.08320.97
5.6.80.0130.07720.29
5.5.350.0200.06020.41
5.5.340.0070.08317.98
5.5.330.0070.08720.42
5.5.320.0100.05720.34
5.5.310.0230.04020.34
5.5.300.0030.06318.04
5.5.290.0130.07318.04
5.5.280.0070.08720.89
5.5.270.0070.08720.73
5.5.260.0230.07320.79
5.5.250.0130.07720.51
5.5.240.0330.06720.20
5.4.450.0930.05019.39
5.4.440.0270.06019.16
5.4.430.0230.05719.45
5.4.420.0230.05319.16
5.4.410.0270.04719.34
5.4.400.0330.04719.24
5.4.390.0200.06019.31
5.4.380.0270.05718.77
5.4.370.0230.05018.74
5.4.360.0270.06018.43
5.4.350.0200.06718.63
5.4.340.0200.06318.57
5.4.320.0090.03712.52
5.4.310.0050.05112.51
5.4.300.0060.03812.52
5.4.290.0060.03812.51
5.4.280.0090.04912.39
5.4.270.0100.04812.39
5.4.260.0140.05012.38
5.4.250.0100.04112.38
5.4.240.0080.05412.39
5.4.230.0110.04212.38
5.4.220.0120.05512.38
5.4.210.0120.05312.38
5.4.200.0150.04812.38
5.4.190.0130.04912.37
5.4.180.0190.06012.37
5.4.170.0110.04012.39
5.4.160.0160.06912.38
5.4.150.0150.05312.38
5.4.140.0130.05712.06
5.4.130.0180.04912.05
5.4.120.0200.06312.01
5.4.110.0140.05912.01
5.4.100.0080.06012.01
5.4.90.0130.04212.00
5.4.80.0060.06512.00
5.4.70.0130.05112.00
5.4.60.0070.05512.00
5.4.50.0100.05012.00
5.4.40.0100.04811.99
5.4.30.0040.05411.98
5.4.20.0100.05111.98
5.4.10.0050.04611.98
5.4.00.0060.03811.48
5.3.290.0130.04212.80
5.3.280.0090.04812.70
5.3.270.0080.05712.72
5.3.260.0070.05812.72
5.3.250.0100.05312.71
5.3.240.0200.05212.72
5.3.230.0150.05112.71
5.3.220.0120.06212.68
5.3.210.0100.07512.68
5.3.200.0080.06212.68
5.3.190.0150.05512.67
5.3.180.0160.05112.67
5.3.170.0140.07912.67
5.3.160.0130.05412.67
5.3.150.0140.04612.67
5.3.140.0150.05912.66
5.3.130.0190.06612.66
5.3.120.0220.03912.66
5.3.110.0130.07912.66
5.3.100.0170.08912.13
5.3.90.0150.08612.11
5.3.80.0220.06612.09
5.3.70.0150.06412.09
5.3.60.0110.07812.07
5.3.50.0260.06512.03
5.3.40.0200.06612.02
5.3.30.0200.09111.98
5.3.20.0100.05311.77
5.3.10.0180.07911.73
5.3.00.0300.09311.72
5.2.170.0120.0619.21
5.2.160.0070.0419.21
5.2.150.0090.0459.22
5.2.140.0080.0309.21
5.2.130.0050.0319.17
5.2.120.0080.0389.17
5.2.110.0100.0629.18
5.2.100.0090.0379.19
5.2.90.0150.0529.17
5.2.80.0160.0519.18
5.2.70.0070.0409.17
5.2.60.0080.0519.13
5.2.50.0140.0549.10
5.2.40.0180.0579.06
5.2.30.0080.0659.05
5.2.20.0170.0499.03
5.2.10.0080.0358.96
5.2.00.0070.0328.83
5.1.60.0080.0498.11
5.1.50.0060.0278.11
5.1.40.0040.0388.09
5.1.30.0080.0388.44
5.1.20.0080.0338.47
5.1.10.0080.0268.19
5.1.00.0050.0398.19
5.0.50.0040.0236.68
5.0.40.0110.0226.54
5.0.30.0060.0416.35
5.0.20.0050.0386.32
5.0.10.0040.0356.29
5.0.00.0040.0536.29
4.4.90.0040.0264.78
4.4.80.0080.0204.75
4.4.70.0050.0224.76
4.4.60.0050.0254.75
4.4.50.0000.0274.77
4.4.40.0040.0334.71
4.4.30.0050.0274.76
4.4.20.0050.0224.84
4.4.10.0020.0264.85
4.4.00.0040.0354.76
4.3.110.0030.0224.67
4.3.100.0100.0284.67
4.3.90.0050.0234.64
4.3.80.0070.0394.59
4.3.70.0020.0224.63
4.3.60.0040.0204.63
4.3.50.0040.0254.63
4.3.40.0020.0334.53
4.3.30.0070.0353.29
4.3.20.0060.0213.26
4.3.10.0040.0213.23
4.3.00.0000.02010.30

preferences:
32.38 ms | 401 KiB | 5 Q