3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T { static $arr = []; public static function a() { self::$arr[] = 'Tx'; static::$arr[] = 'Ty'; } } T::a(); // make no sense if (TRUE) { class C { use T; public static function b() { self::$arr[] = 'Cx'; static::$arr[] = 'Cy'; } } class D { use T; public static function b() { self::$arr[] = 'Dx'; static::$arr[] = 'Dy'; } } } C::a(); C::b(); D::a(); D::b(); assert(C::$arr === ['Tx', 'Ty', 'Cx', 'Cy']); assert(D::$arr === ['Tx', 'Ty', 'Dx', 'Dy']); T::a(); // make no sense assert(C::$arr === ['Tx', 'Ty', 'Cx', 'Cy']); assert(D::$arr === ['Tx', 'Ty', 'Dx', 'Dy']);

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)
8.3.60.0100.01018.68
8.3.50.0160.00721.21
8.3.40.0040.01118.86
8.3.30.0150.00018.49
8.3.20.0130.00720.32
8.3.10.0080.00021.90
8.3.00.0080.00019.69
8.2.180.0090.00616.50
8.2.170.0070.00722.96
8.2.160.0160.00320.33
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0090.00017.75
8.2.110.0040.00419.24
8.2.100.0080.00417.91
8.2.90.0060.00319.17
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0030.00518.05
8.2.50.0060.00318.07
8.2.40.0060.00321.06
8.2.30.0030.00519.92
8.2.20.0040.00417.71
8.2.10.0080.00018.16
8.2.00.0000.00918.18
8.1.280.0110.00325.92
8.1.270.0070.01320.38
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0090.00023.79
8.1.230.0000.01017.51
8.1.220.0070.00317.76
8.1.210.0040.00418.77
8.1.200.0050.00517.35
8.1.190.0060.00617.23
8.1.180.0040.00418.10
8.1.170.0040.00418.65
8.1.160.0000.01022.05
8.1.150.0040.00418.85
8.1.140.0080.00017.48
8.1.130.0000.00817.74
8.1.120.0070.00017.50
8.1.110.0030.00317.48
8.1.100.0080.00017.48
8.1.90.0000.00817.56
8.1.80.0030.00617.49
8.1.70.0000.00817.46
8.1.60.0030.00617.60
8.1.50.0040.00417.47
8.1.40.0040.00417.51
8.1.30.0060.00317.74
8.1.20.0000.00817.58
8.1.10.0060.00317.59
8.1.00.0040.00417.42
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0070.00018.38
8.0.270.0000.00717.28
8.0.260.0030.00317.34
8.0.250.0040.00417.07
8.0.240.0000.00717.04
8.0.230.0030.00316.91
8.0.220.0000.00716.97
8.0.210.0040.00416.84
8.0.200.0030.00316.91
8.0.190.0050.00516.91
8.0.180.0000.00717.09
8.0.170.0050.00217.03
8.0.160.0040.00417.04
8.0.150.0070.00016.82
8.0.140.0000.00716.84
8.0.130.0000.00613.41
8.0.120.0000.00816.96
8.0.110.0040.00416.96
8.0.100.0040.00417.00
8.0.90.0000.00717.02
8.0.80.0060.01216.98
8.0.70.0000.00716.83
8.0.60.0080.00016.92
8.0.50.0040.00416.82
8.0.30.0060.01017.14
8.0.20.0100.00917.40
8.0.10.0030.00317.21
8.0.00.0090.00816.88
7.4.330.0060.00015.08
7.4.320.0030.00316.55
7.4.300.0060.00016.54
7.4.290.0000.00716.59
7.4.280.0000.00716.46
7.4.270.0000.00716.61
7.4.260.0040.00416.34
7.4.250.0000.00816.51
7.4.240.0020.00516.49
7.4.230.0040.00416.21
7.4.220.0070.01716.31
7.4.210.0070.01116.40
7.4.200.0000.00716.50
7.4.160.0160.00016.42
7.4.150.0040.01517.40
7.4.140.0100.01017.86
7.4.130.0090.01116.51
7.4.120.0090.00916.56
7.4.110.0070.01016.43
7.4.100.0210.01016.72
7.4.90.0120.00616.54
7.4.80.0090.01519.39
7.4.70.0060.01016.43
7.4.60.0100.01016.56
7.4.50.0000.00816.40
7.4.40.0030.01416.59
7.4.30.0110.01116.61
7.4.00.0040.01415.12
7.3.330.0000.00513.20
7.3.320.0020.00313.25
7.3.310.0040.00416.36
7.3.300.0060.00016.24
7.3.290.0120.00916.37
7.3.280.0090.01016.36
7.3.270.0080.00817.40
7.3.260.0120.00616.24
7.3.250.0110.00716.42
7.3.240.0130.01016.61
7.3.230.0040.01416.39
7.3.210.0100.00716.30
7.3.200.0160.00016.30
7.3.190.0040.01216.39
7.3.180.0000.01616.45
7.3.170.0070.01016.34
7.3.160.0060.01116.55
7.3.10.0070.00616.38
7.3.00.0080.00516.53
7.2.330.0120.00616.77
7.2.320.0140.00716.41
7.2.310.0130.01016.76
7.2.300.0150.00916.53
7.2.290.0000.02316.83
7.2.130.0060.00616.76
7.2.120.0070.00516.78
7.2.110.0100.00516.64
7.2.100.0040.01016.59
7.2.90.0100.00516.76
7.2.80.0030.00616.61
7.2.70.0130.00616.68
7.2.60.0050.01016.76
7.2.50.0060.00816.95
7.2.40.0040.00816.68
7.2.30.0030.00916.73
7.2.20.0060.00316.71
7.2.10.0030.01016.68
7.2.00.0030.00917.72
7.1.250.0040.00515.57
7.1.200.0090.00315.77
7.1.100.0040.01117.86
7.1.70.0050.00517.20
7.1.60.0060.01820.03
7.1.50.0160.00916.94
7.1.00.0000.08022.33
7.0.200.0250.00714.91
7.0.60.0030.04019.95
7.0.50.0100.07017.93
7.0.40.0000.05320.27
7.0.30.0530.05720.35
7.0.20.0230.08320.33
7.0.10.0030.05020.06
7.0.00.0030.04020.22
5.6.280.0030.07320.90
5.6.210.0200.07720.62
5.6.200.0070.08018.29
5.6.190.0030.08320.39
5.6.180.2800.05020.48
5.6.170.0270.08320.51
5.6.160.0100.03720.46
5.6.150.0100.05018.27
5.6.140.0100.08018.15
5.6.130.0100.08018.24
5.6.120.0100.07321.03
5.6.110.0100.08021.03
5.6.100.0070.04021.14
5.6.90.0100.06320.97
5.6.80.0070.08020.36
5.6.70.4430.04020.37
5.5.350.0270.07720.43
5.5.340.0100.03717.99
5.5.330.0000.05020.19
5.5.320.0270.04320.31
5.5.310.0200.04020.36
5.5.300.0100.05717.98
5.5.290.0100.04018.04
5.5.280.0070.04320.78
5.5.270.0030.04020.97
5.5.260.0070.06020.88
5.5.250.0170.04020.71
5.5.240.0230.07020.27
5.4.450.0600.05319.21
5.4.440.0570.06319.30
5.4.430.0570.06019.58
5.4.420.0600.05319.38
5.4.410.0730.04019.44
5.4.400.0570.05319.08
5.4.390.0630.04319.22
5.4.380.0630.04319.27
5.4.370.0630.05018.79
5.4.360.0770.04019.08
5.4.350.0500.06319.27
5.4.340.0600.05719.27
5.4.320.0570.05319.28
5.4.310.0670.05319.23
5.4.300.0470.06019.28
5.4.290.0630.05019.06
5.4.280.0600.05719.02
5.4.270.0670.05019.06
5.4.260.0730.04719.05
5.4.250.0770.05019.28
5.4.240.0600.04719.08
5.4.230.0630.05019.23
5.4.220.0670.05019.27
5.4.210.0630.05718.91
5.4.200.0570.05318.96
5.4.190.0670.05019.02
5.4.180.0600.05318.78
5.4.170.0630.03719.05
5.4.160.0700.04319.04
5.4.150.0670.05019.22
5.4.140.0700.05016.55
5.4.130.0470.05316.48
5.4.120.0470.05016.45
5.4.110.0500.05016.33
5.4.100.0670.04716.67
5.4.90.0530.05016.33
5.4.80.0670.04316.28
5.4.70.0000.03316.62
5.4.60.0430.04716.48
5.4.50.0100.07016.55
5.4.40.0270.06316.25
5.4.30.0230.04316.43
5.4.20.0170.03716.54

preferences:
59.59 ms | 401 KiB | 5 Q