3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait mytrait { public function foo() { return get_class($this); } } class myclass { use mytrait; } var_dump((new myclass)->foo()); $obj = new myclass; $obj->bar = 'foo'; var_dump($obj->bar);

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.70.0040.01118.68
8.3.60.0110.00718.80
8.3.50.0120.00521.14
8.3.40.0070.00718.84
8.3.30.0100.00320.11
8.3.20.0070.00720.05
8.3.10.0030.00622.15
8.3.00.0050.00322.52
8.2.190.0100.00616.63
8.2.180.0120.00316.63
8.2.170.0070.00722.96
8.2.160.0070.00720.31
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0100.00726.16
8.2.120.0040.00419.54
8.2.110.0140.00722.11
8.2.100.0060.00617.97
8.2.90.0000.00719.31
8.2.80.0080.00019.16
8.2.70.0040.00417.50
8.2.60.0070.00317.90
8.2.50.0000.00918.07
8.2.40.0050.00318.16
8.2.30.0000.00718.08
8.2.20.0000.00717.72
8.2.10.0040.00417.61
8.2.00.0080.00017.73
8.1.280.0070.01025.92
8.1.270.0000.00824.66
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0060.00323.79
8.1.230.0040.00818.96
8.1.220.0000.00917.74
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.66
8.1.180.0000.00720.24
8.1.170.0000.00818.67
8.1.160.0000.00722.05
8.1.150.0080.00018.64
8.1.140.0070.00017.37
8.1.130.0040.00417.83
8.1.120.0110.00017.29
8.1.110.0080.00017.45
8.1.100.0040.00417.53
8.1.90.0000.00717.36
8.1.80.0000.00717.50
8.1.70.0040.00417.38
8.1.60.0050.00217.47
8.1.50.0040.00417.50
8.1.40.0000.00717.50
8.1.30.0040.00417.55
8.1.20.0030.00517.60
8.1.10.0000.00817.59
8.1.00.0040.00417.52
8.0.300.0080.00018.77
8.0.290.0000.00717.05
8.0.280.0040.00418.36
8.0.270.0070.00017.31
8.0.260.0030.00316.71
8.0.250.0040.00416.89
8.0.240.0030.00517.02
8.0.230.0000.00816.86
8.0.220.0030.00516.80
8.0.210.0030.00316.79
8.0.200.0030.00616.82
8.0.190.0030.00316.98
8.0.180.0000.00716.85
8.0.170.0000.00816.93
8.0.160.0040.00416.76
8.0.150.0040.00416.82
8.0.140.0040.00416.88
8.0.130.0050.00013.28
8.0.120.0030.00616.88
8.0.110.0050.00516.93
8.0.100.0000.00716.80
8.0.90.0040.00417.01
8.0.80.0100.01016.86
8.0.70.0080.00016.79
8.0.60.0070.00016.76
8.0.50.0040.00416.89
8.0.30.0110.00917.29
8.0.20.0060.01217.40
8.0.10.0050.00217.05
8.0.00.0050.01216.78
7.4.330.0000.00615.00
7.4.320.0030.00316.65
7.4.300.0030.00316.50
7.4.290.0040.00416.51
7.4.280.0000.00616.51
7.4.270.0000.00616.52
7.4.260.0000.00716.41
7.4.250.0040.00416.47
7.4.240.0030.00516.53
7.4.230.0000.00716.48
7.4.220.0150.01316.69
7.4.210.0050.01116.49
7.4.200.0070.00016.68
7.4.190.0040.00416.46
7.4.160.0130.00916.49
7.4.150.0140.00317.40
7.4.140.0080.01317.86
7.4.130.0100.00916.54
7.4.120.0080.01116.38
7.4.110.0100.00716.47
7.4.100.0180.00016.49
7.4.90.0070.01116.53
7.4.80.0140.00819.39
7.4.70.0120.00416.58
7.4.60.0130.00716.65
7.4.50.0080.00016.57
7.4.40.0070.00722.77
7.4.30.0150.00616.57
7.4.00.0060.01114.88
7.3.330.0000.00513.33
7.3.320.0000.00613.17
7.3.310.0030.00316.34
7.3.300.0030.00316.17
7.3.290.0040.01116.28
7.3.280.0080.00916.31
7.3.270.0120.00617.40
7.3.260.0090.00916.40
7.3.250.0090.01016.29
7.3.240.0090.00916.51
7.3.230.0160.00016.43
7.3.210.0070.01016.45
7.3.200.0150.00619.39
7.3.190.0130.00316.27
7.3.180.0120.00316.36
7.3.170.0060.00916.41
7.3.160.0090.00616.56
7.3.120.0050.01314.77
7.3.110.0000.01814.98
7.3.100.0000.01414.81
7.3.90.0070.01014.79
7.3.80.0080.00814.94
7.3.70.0030.01014.84
7.3.60.0060.00614.70
7.3.50.0100.00614.82
7.3.40.0060.00814.93
7.3.30.0030.01014.71
7.3.20.0080.00816.61
7.3.10.0090.00616.63
7.3.00.0050.00916.63
7.2.330.0100.00716.75
7.2.320.0080.01616.62
7.2.310.0090.00916.70
7.2.300.0060.01116.58
7.2.290.0110.01116.70
7.2.250.0030.01714.80
7.2.240.0140.00715.20
7.2.230.0030.01615.03
7.2.220.0030.01415.05
7.2.210.0140.00014.90
7.2.200.0040.00814.78
7.2.190.0070.00715.00
7.2.180.0160.00015.11
7.2.170.0040.00715.00
7.2.130.0030.01217.02
7.2.120.0030.00616.92
7.2.110.0000.01016.58
7.2.100.0070.00716.99
7.2.90.0040.00816.82
7.2.80.0080.00416.66
7.2.70.0120.00316.67
7.2.60.0060.00616.81
7.2.50.0100.01016.66
7.2.40.0100.00316.65
7.2.30.0090.00316.82
7.2.20.0030.01017.13
7.2.10.0000.01017.02
7.2.00.0050.00818.10
7.1.330.0090.00315.76
7.1.320.0070.00415.57
7.1.310.0030.01215.73
7.1.300.0090.00915.85
7.1.290.0050.01215.66
7.1.280.0090.00615.75
7.1.270.0110.00315.66
7.1.260.0060.00615.84
7.1.250.0030.01015.73
7.1.200.0030.00915.89
7.1.100.0060.00617.91
7.1.70.0070.00017.28
7.1.60.0100.01419.21
7.1.50.0030.02116.64
7.1.00.0030.05722.35
7.0.200.0170.00714.85
7.0.140.0070.07021.97
7.0.60.0070.03720.03
7.0.50.0030.08017.89
7.0.40.0100.04020.30
7.0.30.0100.04720.11
7.0.20.0300.04720.15
7.0.10.0230.03320.08
7.0.00.0100.08320.07
5.6.280.0000.07721.09
5.6.210.0130.05720.65
5.6.200.0000.04718.15
5.6.190.0170.05020.56
5.6.180.0300.07720.48
5.6.170.0530.06320.43
5.6.160.0030.04020.46
5.6.150.0070.08318.20
5.6.140.0070.08018.29
5.6.130.0000.04718.11
5.6.120.0000.06021.02
5.6.110.0030.08021.20
5.6.100.0130.06020.98
5.6.90.0030.05320.99
5.6.80.0130.06720.43
5.6.70.0300.06720.43
5.5.350.0170.06720.41
5.5.340.0100.07018.10
5.5.330.0070.05720.43
5.5.320.0230.04020.28
5.5.310.0300.04320.34
5.5.300.0100.07317.97
5.5.290.0070.07318.07
5.5.280.0030.08720.80
5.5.270.0170.06320.77
5.5.260.0170.07720.88
5.5.250.0130.08020.55
5.5.240.0100.08020.04
5.4.450.0770.06319.45
5.4.440.0700.06319.64
5.4.430.0000.06719.33
5.4.420.1000.04319.60
5.4.410.0230.05319.32
5.4.400.0500.05718.88
5.4.390.0470.04318.72
5.4.380.0370.07018.70
5.4.370.0130.05318.62
5.4.360.0230.04018.70
5.4.350.0100.03712.02
5.4.340.0110.04312.01
5.4.320.0080.04412.50
5.4.310.0090.03812.50
5.4.300.0090.03312.50
5.4.290.0070.03712.50
5.4.280.0070.03712.39
5.4.270.0060.03512.40
5.4.260.0060.03612.39
5.4.250.0000.07318.95
5.4.240.0130.06318.79
5.4.230.0230.06718.80
5.4.220.0070.05718.95
5.4.210.0070.05318.94
5.4.200.0030.07318.98
5.4.190.0070.05018.64
5.4.180.0170.05018.93
5.4.170.0130.04719.02
5.4.160.0100.05318.98
5.4.150.0130.05018.78
5.4.140.0030.08016.39
5.4.130.0100.04316.56
5.4.120.0070.05316.36
5.4.110.0030.05316.56
5.4.100.0170.04716.57
5.4.90.0130.06716.51
5.4.80.0130.04316.31
5.4.70.0100.07316.45
5.4.60.0170.05016.46
5.4.50.0170.04716.39
5.4.40.0070.07016.50
5.4.30.0130.06016.48
5.4.20.0100.05016.59
5.4.10.0170.04716.35
5.4.00.0070.05315.87
5.3.290.0070.03812.80
5.3.280.0070.05314.60
5.3.270.0130.07314.63
5.3.260.0100.05314.48
5.3.250.0100.04714.62
5.3.240.0070.05714.38
5.3.230.0070.05314.59
5.3.220.0030.05314.48
5.3.210.0170.05314.56
5.3.200.0100.05014.72
5.3.190.0100.05314.56
5.3.180.0130.06014.57
5.3.170.0070.06314.57
5.3.160.0130.06314.40
5.3.150.0100.06714.26
5.3.140.0100.07014.60
5.3.130.0100.06314.54
5.3.120.0100.07314.43
5.3.110.0030.06014.57
5.3.100.0030.07313.88
5.3.90.0100.04714.04
5.3.80.0100.05013.90
5.3.70.0200.05014.03
5.3.60.0100.05014.02
5.3.50.0000.06014.10
5.3.40.0030.05713.96
5.3.30.0170.04313.78
5.3.20.0100.06713.61
5.3.10.0000.06013.54
5.3.00.0130.04713.48
5.2.170.0070.06311.07
5.2.160.0100.05711.06
5.2.150.0030.06311.07
5.2.140.0130.03711.05
5.2.130.0130.05310.98
5.2.120.0130.04011.12
5.2.110.0170.03711.11
5.2.100.0200.05011.10
5.2.90.0100.04011.11
5.2.80.0200.05011.19
5.2.70.0000.05311.10
5.2.60.0030.04310.80
5.2.50.0030.04310.85
5.2.40.0100.04010.88
5.2.30.0130.03311.08
5.2.20.0170.02710.98
5.2.10.0070.03710.76
5.2.00.0100.04710.80
5.1.60.0030.05310.02
5.1.50.0130.0279.76
5.1.40.0030.0409.91
5.1.30.0070.04010.55
5.1.20.0170.03710.25
5.1.10.0070.03710.15
5.1.00.0070.04010.21
5.0.50.0100.0308.69
5.0.40.0030.0408.33
5.0.30.0030.0478.24
5.0.20.0070.0337.97
5.0.10.0000.0308.15
5.0.00.0070.0477.98
4.4.90.0000.0237.40
4.4.80.0070.0277.40
4.4.70.0000.0237.40
4.4.60.0070.0177.40
4.4.50.0000.0237.40
4.4.40.0000.0477.40
4.4.30.0000.0237.40
4.4.20.0070.0177.40
4.4.10.0070.0177.40
4.4.00.0030.0337.40
4.3.110.0000.0237.40
4.3.100.0070.0207.40
4.3.90.0000.0277.40
4.3.80.0000.0407.40
4.3.70.0130.0137.40
4.3.60.0030.0237.40
4.3.50.0130.0137.40
4.3.40.0000.0377.40
4.3.30.0000.0307.40
4.3.20.0000.0237.40
4.3.10.0030.0207.40
4.3.00.0170.0176.13

preferences:
44.07 ms | 401 KiB | 5 Q