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]/$moves; $y = $points[$i-1]->Y + ($point->Y - $mouseY)/$moves; echo $x.';'.$y.' (coef '.$xCoefs[$i].')'."\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.0280.00616.46
7.3.00.0350.00615.95
7.2.130.0230.00816.55
7.2.120.0170.00316.55
7.2.110.0310.00616.77
7.2.100.0200.01416.30
7.2.90.0110.01516.32
7.2.80.0320.00916.62
7.2.70.0270.00416.31
7.2.60.0170.00716.63
7.2.50.0200.00316.84
7.2.40.0310.00316.28
7.2.30.0150.00916.26
7.2.20.0490.00316.97
7.2.10.0290.00016.52
7.2.00.0190.00518.09
7.1.250.0090.00915.36
7.1.70.0000.00916.91
7.1.60.0070.01719.46
7.1.50.0070.01416.88
7.1.00.0030.07022.43
7.0.200.0040.00416.84
7.0.140.0030.07321.97
7.0.60.0100.08019.96
7.0.50.0100.08317.93
7.0.40.0100.05020.30
7.0.30.0570.05320.10
7.0.20.0230.07320.33
7.0.10.0030.08020.25
7.0.00.0100.08720.15
5.6.280.0070.07021.16
5.6.210.0000.09020.61
5.6.200.0030.08718.19
5.6.190.0070.09720.61
5.6.180.0370.06320.50
5.6.170.0230.05320.46
5.6.160.0070.07320.57
5.6.150.0130.07318.18
5.6.140.0200.07318.18
5.6.130.0170.03318.25
5.6.120.0070.04021.05
5.6.110.0070.06021.13
5.6.100.0130.08320.91
5.6.90.0070.09021.11
5.6.80.0070.07320.40
5.6.70.4600.03720.43
5.5.350.0130.08320.39
5.5.340.0000.04017.98
5.5.330.0030.04020.27
5.5.320.0070.03720.25
5.5.310.0130.04320.41
5.5.300.0200.05017.95
5.5.290.0100.03318.04
5.5.280.0100.08020.81
5.5.270.0100.08720.88
5.5.260.0070.04020.64
5.5.250.0030.08320.60
5.5.240.0330.06020.37
5.4.450.0700.06019.59
5.4.440.0400.04319.43
5.4.430.0230.06319.58
5.4.420.0700.04719.69
5.4.410.0670.06019.42
5.4.400.0300.06019.38
5.4.390.0170.05018.86
5.4.380.0200.05718.50
5.4.370.0270.05318.78
5.4.360.0400.05018.78
5.4.350.0400.05018.54
5.4.340.0330.04718.79
5.4.320.0040.04412.52
5.4.310.0060.04412.51
5.4.300.0040.03712.52
5.4.290.0070.04012.51
5.4.280.0090.05112.38
5.4.270.0130.04412.39
5.4.260.0050.05612.39
5.4.250.0100.05512.38
5.4.240.0080.05212.39
5.4.230.0070.05512.38
5.4.220.0090.05212.38
5.4.210.0070.05312.38
5.4.200.0090.05512.38
5.4.190.0090.05512.38
5.4.180.0100.05112.37
5.4.170.0060.05612.38
5.4.160.0100.05012.38
5.4.150.0120.04712.38
5.4.140.0140.05012.07
5.4.130.0100.05012.05
5.4.120.0120.05012.01
5.4.110.0110.05312.00
5.4.100.0090.05212.01
5.4.90.0150.05012.01
5.4.80.0130.05312.00
5.4.70.0130.05012.00
5.4.60.0100.05712.00
5.4.50.0070.06312.00
5.4.40.0130.05311.99
5.4.30.0100.05111.98
5.4.20.0100.05511.99
5.4.10.0090.05511.99
5.4.00.0100.05311.48
5.3.290.0050.04212.80
5.3.280.0270.06712.71
5.3.270.0070.06412.72
5.3.260.0140.05212.72
5.3.250.0130.05212.72
5.3.240.0130.05812.72
5.3.230.0130.05312.71
5.3.220.0130.05212.68
5.3.210.0070.06612.68
5.3.200.0130.05512.68
5.3.190.0170.05112.68
5.3.180.0130.05412.67
5.3.170.0130.05412.67
5.3.160.0120.05612.67
5.3.150.0170.05412.67
5.3.140.0060.05612.66
5.3.130.0110.05412.66
5.3.120.0130.05212.66
5.3.110.0160.05812.66
5.3.100.0110.05912.12
5.3.90.0150.05312.11
5.3.80.0110.05012.09
5.3.70.0140.05212.09
5.3.60.0120.05312.07
5.3.50.0130.05612.02
5.3.40.0110.05612.02
5.3.30.0340.10011.98
5.3.20.0290.11511.77
5.3.10.0310.10511.73
5.3.00.0110.06911.72
5.2.170.0050.0539.21
5.2.160.0080.0459.21
5.2.150.0090.0479.21
5.2.140.0150.0459.21
5.2.130.0100.0449.17
5.2.120.0110.0429.18
5.2.110.0230.0879.18
5.2.100.0170.0569.18
5.2.90.0230.0729.17
5.2.80.0130.0409.17
5.2.70.0100.0739.17
5.2.60.0080.0509.12
5.2.50.0090.0479.09
5.2.40.0100.0439.07
5.2.30.0080.0499.05
5.2.20.0080.0449.03
5.2.10.0090.0448.96
5.2.00.0060.0488.83
5.1.60.0050.0428.11
5.1.50.0100.0398.11
5.1.40.0050.0428.09
5.1.30.0060.0458.43
5.1.20.0070.0438.46
5.1.10.0090.0418.19
5.1.00.0100.0418.19
5.0.50.0070.0316.67
5.0.40.0080.0316.54
5.0.30.0070.0486.35
5.0.20.0060.0316.31
5.0.10.0070.0316.29
5.0.00.0070.0426.29
4.4.90.0080.0244.78
4.4.80.0040.0254.75
4.4.70.0040.0264.75
4.4.60.0040.0244.75
4.4.50.0060.0224.77
4.4.40.0080.0334.70
4.4.30.0080.0184.76
4.4.20.0040.0234.84
4.4.10.0050.0224.85
4.4.00.0050.0354.76
4.3.110.0100.0384.67
4.3.100.0070.0184.66
4.3.90.0050.0344.63
4.3.80.0060.0384.58
4.3.70.0060.0264.63
4.3.60.0050.0274.63
4.3.50.0090.0354.63
4.3.40.0070.0334.54
4.3.30.0040.0283.28
4.3.20.0060.0263.26
4.3.10.0040.0263.23
4.3.00.0130.02010.30

preferences:
38.64 ms | 401 KiB | 5 Q