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; } echo $delta.' -> '.(1/$delta)."\r\n"; $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.2.00.0070.00719.05
7.1.70.0140.00017.02
7.1.60.0040.02119.46
7.1.50.0090.01216.63
7.1.00.0170.06022.24
7.0.200.0030.00316.61
7.0.140.0000.07722.18
7.0.60.0130.06321.79
7.0.50.0030.05017.94
7.0.40.0070.06320.13
7.0.30.0370.07020.26
7.0.20.0270.05720.19
7.0.10.0100.08320.22
7.0.00.0030.04720.15
5.6.280.0030.07321.11
5.6.210.0030.04020.52
5.6.200.0070.05318.24
5.6.190.0100.04020.47
5.6.180.0330.07320.39
5.6.170.0100.04720.56
5.6.160.0100.08320.39
5.6.150.0000.07718.29
5.6.140.0000.06718.23
5.6.130.0130.05318.29
5.6.120.0100.05021.00
5.6.110.0070.08721.00
5.6.100.0030.04320.99
5.6.90.0130.08020.98
5.6.80.0100.07320.44
5.5.350.4430.03720.38
5.5.340.0000.04318.09
5.5.330.0000.04320.57
5.5.320.0030.04020.51
5.5.310.0170.04020.33
5.5.300.0000.04717.95
5.5.290.0000.09017.92
5.5.280.0130.05720.78
5.5.270.0170.08320.88
5.5.260.0000.04320.74
5.5.250.0170.06020.70
5.5.240.0200.08020.09
5.4.450.0700.06019.48
5.4.440.0330.04319.63
5.4.430.0330.07319.47
5.4.420.0330.04719.19
5.4.410.0400.06019.18
5.4.400.0270.04719.15
5.4.390.0330.04319.38
5.4.380.0970.06718.62
5.4.370.0230.06018.48
5.4.360.0370.04018.63
5.4.350.0130.06318.79
5.4.340.0370.06718.75
5.4.320.0060.03612.52
5.4.310.0090.03712.52
5.4.300.0050.03912.51
5.4.290.0040.04112.52
5.4.280.0070.06612.39
5.4.270.0130.06912.39
5.4.260.0030.07312.39
5.4.250.0110.08412.39
5.4.240.0150.07912.39
5.4.230.0190.07412.38
5.4.220.0210.07612.38
5.4.210.0100.05612.38
5.4.200.0110.06312.38
5.4.190.0240.09412.37
5.4.180.0250.12712.38
5.4.170.0140.05012.39
5.4.160.0320.06812.39
5.4.150.0150.06412.38
5.4.140.0160.06912.06
5.4.130.0190.08212.05
5.4.120.0270.09912.01
5.4.110.0130.06212.00
5.4.100.0100.06412.00
5.4.90.0140.07012.00
5.4.80.0200.06412.00
5.4.70.0140.06312.00
5.4.60.0140.06512.00
5.4.50.0120.06912.00
5.4.40.0120.05811.99
5.4.30.0140.07511.98
5.4.20.0180.08511.99
5.4.10.0300.08211.98
5.4.00.0120.08411.48
5.3.290.0080.03812.80
5.3.280.0280.12212.70
5.3.270.0200.12012.73
5.3.260.0180.05912.72
5.3.250.0230.05912.72
5.3.240.0150.10612.72
5.3.230.0070.07112.71
5.3.220.0130.08012.68
5.3.210.0330.16812.68
5.3.200.0100.07912.68
5.3.190.0090.05712.68
5.3.180.0110.04912.67
5.3.170.0120.06412.67
5.3.160.0080.05912.67
5.3.150.0120.04512.67
5.3.140.0140.04712.66
5.3.130.0090.04112.66
5.3.120.0070.04412.66
5.3.110.0130.03812.66
5.3.100.0110.05112.13
5.3.90.0100.04612.11
5.3.80.0080.04912.09
5.3.70.0100.03712.09
5.3.60.0080.05012.07
5.3.50.0100.04212.02
5.3.40.0090.03812.03
5.3.30.0070.03911.98
5.3.20.0140.03511.77
5.3.10.0090.05011.73
5.3.00.0100.05611.72
5.2.170.0050.0429.22
5.2.160.0070.0349.21
5.2.150.0120.0549.21
5.2.140.0030.0459.21
5.2.130.0050.0419.17
5.2.120.0060.0339.17
5.2.110.0090.0299.18
5.2.100.0060.0329.18
5.2.90.0070.0329.17
5.2.80.0100.0349.17
5.2.70.0080.0299.17
5.2.60.0070.0319.13
5.2.50.0040.0459.09
5.2.40.0090.0399.07
5.2.30.0140.0439.05
5.2.20.0110.0429.03
5.2.10.0150.0478.96
5.2.00.0060.0488.83
5.1.60.0090.0378.11
5.1.50.0160.0438.11
5.1.40.0130.0458.09
5.1.30.0070.0358.44
5.1.20.0070.0298.46
5.1.10.0070.0268.18
5.1.00.0090.0278.18
5.0.50.0110.0456.67
5.0.40.0110.0206.53
5.0.30.0100.0496.35
5.0.20.0030.0236.31
5.0.10.0080.0186.29
5.0.00.0040.0356.29
4.4.90.0040.0164.78
4.4.80.0060.0154.76
4.4.70.0020.0184.75
4.4.60.0100.0244.75
4.4.50.0100.0414.77
4.4.40.0060.0654.71
4.4.30.0070.0334.76
4.4.20.0040.0214.84
4.4.10.0040.0214.85
4.4.00.0070.0394.76
4.3.110.0090.0364.67
4.3.100.0160.0324.66
4.3.90.0080.0264.63
4.3.80.0030.0424.59
4.3.70.0060.0264.63
4.3.60.0050.0264.63
4.3.50.0060.0244.62
4.3.40.0040.0374.54
4.3.30.0100.0393.29
4.3.20.0030.0263.27
4.3.10.0010.0183.23
4.3.00.0000.01310.30

preferences:
42.59 ms | 401 KiB | 5 Q