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 = 100; $mouseY = 100; $point = new Point(200, 200); $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 - $points[$i-1]->X)*$xCoefs[$i]/$moves; $y = $points[$i-1]->Y + ($point->Y - $points[$i-1]->Y)/$moves; $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.4.10.0070.01416.36
7.4.00.0060.01016.48
7.3.130.0070.00716.43
7.3.120.0110.00515.59
7.3.110.0050.00915.64
7.3.100.0090.00515.42
7.3.90.0070.00915.61
7.3.80.0050.00915.56
7.3.70.0070.00915.60
7.3.60.0060.00915.45
7.3.50.0040.01315.62
7.3.40.0030.00815.48
7.3.30.0050.00815.47
7.3.20.0000.01217.41
7.3.10.0050.00917.05
7.3.00.0060.00717.04
7.2.260.0140.00316.68
7.2.250.0100.01316.50
7.2.240.0110.00515.86
7.2.230.0110.00515.79
7.2.220.0070.01016.01
7.2.210.0130.00315.58
7.2.200.0050.01115.79
7.2.190.0090.00715.83
7.2.180.0100.00215.89
7.2.170.0080.00915.75
7.2.160.0050.01115.83
7.2.150.0040.01317.59
7.2.140.0030.01217.83
7.2.130.0070.00917.27
7.2.120.0070.00717.22
7.2.110.0070.00717.24
7.2.100.0050.01017.34
7.2.90.0060.00817.38
7.2.80.0050.01117.29
7.2.70.0070.00517.29
7.2.60.0070.00817.21
7.2.50.0040.00917.30
7.2.40.0040.00917.26
7.2.30.0030.01117.30
7.2.20.0040.01017.24
7.2.10.0060.01117.32
7.2.00.0080.00617.69
7.1.330.0050.01216.72
7.1.320.0070.01016.70
7.1.310.0070.00816.63
7.1.300.0100.00716.52
7.1.290.0050.00916.51
7.1.280.0050.01116.67
7.1.270.0030.01016.57
7.1.260.0050.00816.45
7.1.250.0030.01016.16
7.1.240.0060.00917.55
7.1.230.0080.00317.39
7.1.220.0060.00917.18
7.1.210.0080.00817.38
7.1.200.0070.00717.29
7.1.190.0000.01517.22
7.1.180.0090.00317.34
7.1.170.0070.00717.38
7.1.160.0000.01617.50
7.1.150.0040.00717.46
7.1.140.0000.01717.32
7.1.130.0040.01117.36
7.1.120.0090.00917.39
7.1.110.0070.01017.34
7.1.100.0040.00717.41
7.1.90.0070.00717.24
7.1.80.0090.00317.23
7.1.70.0040.00617.35
7.1.60.0080.01118.35
7.1.50.0060.00816.98
7.1.40.0040.01217.23
7.1.30.0030.01017.24
7.1.20.0000.01217.25
7.1.10.0070.00717.38
7.1.00.0050.04419.87
7.0.330.0000.01216.96
7.0.320.0030.01217.07
7.0.310.0030.01017.12
7.0.300.0000.01316.95
7.0.290.0070.00717.07
7.0.280.0070.00717.04
7.0.270.0080.00316.89
7.0.260.0060.00916.90
7.0.250.0060.00917.20
7.0.240.0130.00716.74
7.0.230.0100.01016.96
7.0.220.0060.00616.97
7.0.210.0130.00317.05
7.0.200.0010.00816.93
7.0.190.0100.00317.02
7.0.180.0000.01517.00
7.0.170.0090.00317.07
7.0.160.0070.01017.02
7.0.150.0130.00317.03
7.0.140.0020.04519.51
7.0.130.0030.00717.14
7.0.120.0130.00017.08
7.0.110.0030.00617.09
7.0.100.0040.01116.99
7.0.90.0000.01416.99
7.0.80.0000.01017.27
7.0.70.0030.00917.02
7.0.60.0130.03118.53
7.0.50.0080.02717.41
7.0.40.0050.05117.51
7.0.30.0130.03517.59
7.0.20.0150.03917.47
7.0.10.0030.03017.58
7.0.00.0070.02317.56
5.6.400.0060.01116.13
5.6.390.0120.00016.14
5.6.380.0060.00915.91
5.6.370.0090.00616.20
5.6.360.0070.00716.14
5.6.350.0000.01416.03
5.6.340.0040.01116.37
5.6.330.0030.01216.05
5.6.320.0110.00016.13
5.6.310.0000.01116.04
5.6.300.0060.00616.16
5.6.290.0030.01315.92
5.6.280.0090.04018.52
5.6.270.0080.00415.91
5.6.260.0110.00416.00
5.6.250.0000.01216.14
5.6.240.0120.00315.96
5.6.230.0080.00516.05
5.6.220.0030.01316.04
5.6.210.0160.03318.40
5.6.200.0100.04017.14
5.6.190.0050.04018.27
5.6.180.0270.04118.46
5.6.170.0120.03518.26
5.6.160.0110.04318.16
5.6.150.0090.04417.01
5.6.140.0080.04417.11
5.6.130.0080.02117.22
5.6.120.0050.04118.44
5.6.110.0050.04818.53
5.6.100.0110.02318.46
5.6.90.0090.04418.64
5.6.80.0050.02518.22
5.6.70.0060.00915.78
5.6.60.0090.00616.05
5.6.50.0090.00615.97
5.6.40.0070.00315.77
5.6.30.0090.00915.99
5.6.20.0100.00716.11
5.6.10.0060.01015.94
5.6.00.0080.00816.08
5.5.380.0100.00316.08
5.5.370.0070.01116.10
5.5.360.0030.01315.93
5.5.350.0270.04018.19
5.5.340.0070.02417.01
5.5.330.0110.02018.13
5.5.320.0060.03818.18
5.5.310.0260.03518.24
5.5.300.0070.04716.94
5.5.290.0040.05016.94
5.5.280.0090.03418.42
5.5.270.0210.03818.55
5.5.260.0110.03418.45
5.5.250.0080.03318.29
5.5.240.0070.02718.09
5.5.230.0080.00515.89
5.5.220.0000.01715.84
5.5.210.0070.01015.96
5.5.200.0030.01315.92
5.5.190.0090.00315.99
5.5.180.0030.01315.86
5.5.170.0030.01415.91
5.5.160.0070.00715.90
5.5.150.0090.00615.86
5.5.140.0090.00615.74
5.5.130.0060.00915.79
5.5.120.0060.00616.00
5.5.110.0060.00915.96
5.5.100.0060.00915.84
5.5.90.0100.00615.67
5.5.80.0040.00715.79
5.5.70.0080.00615.88
5.5.60.0100.00315.64
5.5.50.0030.01015.80
5.5.40.0170.00015.80
5.5.30.0090.00615.89
5.5.20.0030.01015.77
5.5.10.0070.01015.87
5.5.00.0060.01215.82
5.4.450.0210.03316.05
5.4.440.0120.03316.23
5.4.430.0100.03116.11
5.4.420.0080.03116.24
5.4.410.0000.03816.13
5.4.400.0070.03015.99
5.4.390.0060.03315.91
5.4.380.0150.02915.68
5.4.370.0150.02815.65
5.4.360.0120.03315.68
5.4.350.0180.03315.81
5.4.340.0200.02515.56
5.4.330.0000.00812.80
5.4.320.0040.02212.72
5.4.310.0060.02312.63
5.4.300.0030.02812.66
5.4.290.0050.02312.68
5.4.280.0150.06612.66
5.4.270.0080.05012.51
5.4.260.0110.02612.61
5.4.250.0080.03212.53
5.4.240.0090.03212.56
5.4.230.0130.04612.59
5.4.220.0110.02812.48
5.4.210.0070.03212.47
5.4.200.0090.02812.66
5.4.190.0090.02912.66
5.4.180.0100.03112.66
5.4.170.0140.04812.60
5.4.160.0140.03612.63
5.4.150.0090.04112.68
5.4.140.0060.03212.42
5.4.130.0080.02812.31
5.4.120.0080.02912.32
5.4.110.0180.05212.38
5.4.100.0100.03212.39
5.4.90.0070.04412.45
5.4.80.0090.04112.42
5.4.70.0070.03012.46
5.4.60.0070.02812.42
5.4.50.0120.04012.39
5.4.40.0110.03012.36
5.4.30.0050.03912.45
5.4.20.0070.03312.39
5.4.10.0070.03112.37
5.4.00.0040.03512.06
5.3.290.0110.01813.01
5.3.280.0120.03412.81
5.3.270.0110.02912.91
5.3.260.0100.02812.92
5.3.250.0080.03012.86
5.3.240.0020.04612.90
5.3.230.0140.05612.95
5.3.220.0040.03712.85
5.3.210.0100.03812.83
5.3.200.0120.02812.81
5.3.190.0060.02913.01
5.3.180.0090.03612.93
5.3.170.0120.04712.99
5.3.160.0190.05712.92
5.3.150.0120.04412.93
5.3.140.0050.03212.93
5.3.130.0050.03712.88
5.3.120.0100.04612.87
5.3.110.0100.04012.88
5.3.100.0090.03812.66
5.3.90.0080.03412.67
5.3.80.0080.03912.57
5.3.70.0070.03612.61
5.3.60.0140.04912.56
5.3.50.0150.02912.60
5.3.40.0090.03412.59
5.3.30.0130.04512.59
5.3.20.0080.05812.32
5.3.10.0080.03012.26
5.3.00.0130.02412.30
5.2.170.0130.0699.21
5.2.160.0220.1059.22
5.2.150.0370.1199.21
5.2.140.0110.0489.21
5.2.130.0090.0479.17
5.2.120.0150.0419.18
5.2.110.0060.0559.18
5.2.100.0060.0379.18
5.2.90.0130.0429.18
5.2.80.0100.0459.18
5.2.70.0120.0729.17
5.2.60.0200.0969.12
5.2.50.0120.0899.10
5.2.40.0150.1319.07
5.2.30.0180.1069.05
5.2.20.0230.0869.03
5.2.10.0090.0378.95
5.2.00.0120.0768.81
5.1.60.0090.0348.09
5.1.50.0060.0358.09
5.1.40.0080.0348.07
5.1.30.0110.0528.42
5.1.20.0080.0658.45
5.1.10.0070.0388.17
5.1.00.0080.0348.17
5.0.50.0040.0306.65
5.0.40.0080.0296.52
5.0.30.0090.0586.33
5.0.20.0080.0266.30
5.0.10.0070.0296.27
5.0.00.0070.0396.27
4.4.90.0020.0234.77
4.4.80.0040.0214.75
4.4.70.0070.0174.75
4.4.60.0050.0214.75
4.4.50.0050.0214.77
4.4.40.0030.0334.70
4.4.30.0040.0174.76
4.4.20.0030.0164.84
4.4.10.0040.0154.85
4.4.00.0030.0264.76
4.3.110.0040.0174.67
4.3.100.0040.0164.67
4.3.90.0030.0154.63
4.3.80.0060.0514.58
4.3.70.0060.0324.63
4.3.60.0190.0544.63
4.3.50.0080.0424.63
4.3.40.0100.0764.54
4.3.30.0110.0423.29
4.3.20.0060.0513.26
4.3.10.0090.0383.23
4.3.00.0030.0236.38

preferences:
45.66 ms | 401 KiB | 5 Q