3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooNotUsingBarTrait { } if (trait_exists(BarTrait::class)) { class Foo extends FooUsingBarTrait { } } else { class Foo extends FooNotUsingBarTrait { } } $foo = new Foo(); var_dump( get_class($foo), class_parents(Foo::class) );

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.5.20.0070.00918.75
8.5.10.0120.00818.14
8.5.00.0130.01220.01
8.4.170.0040.00620.54
8.4.160.0120.00823.97
8.4.150.0030.00014.05
8.4.140.0110.00917.36
8.4.130.0050.00518.55
8.4.120.0120.00724.17
8.4.110.0100.01022.19
8.4.100.0150.00517.71
8.4.90.0140.00717.69
8.4.80.0080.01117.77
8.4.70.0120.00419.21
8.4.60.0110.01118.64
8.4.50.0140.00619.38
8.4.40.0170.00319.44
8.4.30.0140.00617.45
8.4.20.0160.00317.49
8.4.10.0070.00419.70
8.3.300.0120.01020.89
8.3.290.0140.00620.62
8.3.280.0140.00718.29
8.3.270.0120.00716.40
8.3.260.0030.00516.38
8.3.250.0110.00818.85
8.3.240.0130.00717.06
8.3.230.0130.00616.48
8.3.220.0030.00517.23
8.3.210.0110.00416.48
8.3.200.0050.00416.32
8.3.190.0140.00518.17
8.3.180.0120.00519.04
8.3.170.0090.00016.41
8.3.160.0030.00516.61
8.3.150.0060.01217.27
8.3.140.0040.00416.98
8.3.130.0000.00816.62
8.3.120.0090.00918.94
8.3.110.0080.00020.94
8.3.100.0050.00516.70
8.3.90.0050.00326.77
8.3.80.0060.00316.38
8.3.70.0100.00616.58
8.3.60.0130.00318.42
8.3.50.0090.00817.39
8.3.40.0100.00718.66
8.3.30.0070.00718.67
8.3.20.0040.00422.07
8.3.10.0080.00022.04
8.3.00.0080.00020.90
8.2.300.0100.01021.94
8.2.290.0110.00720.27
8.2.280.0080.00516.83
8.2.270.0150.00417.35
8.2.260.0080.00016.56
8.2.250.0060.00316.71
8.2.240.0130.00017.29
8.2.230.0030.00622.58
8.2.220.0070.00324.06
8.2.210.0040.00426.77
8.2.200.0030.00616.63
8.2.190.0070.01416.75
8.2.180.0030.01218.29
8.2.170.0100.00322.96
8.2.160.0120.00919.33
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00021.11
8.2.110.0060.00320.51
8.2.100.0120.00017.91
8.2.90.0000.00818.16
8.2.80.0080.00019.16
8.2.70.0030.00518.04
8.2.60.0030.00518.02
8.2.50.0030.00618.07
8.2.40.0000.00818.04
8.2.30.0040.00418.16
8.2.20.0030.00517.91
8.2.10.0000.00717.98
8.2.00.0040.00417.92
8.1.340.0120.00721.73
8.1.330.0120.00721.82
8.1.320.0150.00418.54
8.1.310.0000.00818.47
8.1.300.0030.00619.92
8.1.290.0110.00030.84
8.1.280.0120.00925.92
8.1.270.0040.00423.99
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0050.00322.02
8.1.230.0110.00021.03
8.1.220.0080.00017.79
8.1.210.0030.00618.77
8.1.200.0000.00917.23
8.1.190.0050.00317.22
8.1.180.0050.00318.10
8.1.170.0060.00318.74
8.1.160.0040.00718.89
8.1.150.0060.00320.39
8.1.140.0040.00419.57
8.1.130.0000.00820.63
8.1.120.0000.00717.50
8.1.110.0080.00017.44
8.1.100.0040.00417.48
8.1.90.0020.00517.46
8.1.80.0000.00717.38
8.1.70.0030.00617.47
8.1.60.0030.00617.51
8.1.50.0040.00817.47
8.1.40.0000.00817.49
8.1.30.0080.00017.56
8.1.20.0000.00917.68
8.1.10.0030.00517.50
8.1.00.0060.00317.42
8.0.300.0040.00420.16
8.0.290.0060.00316.75
8.0.280.0070.00018.31
8.0.270.0000.00717.16
8.0.260.0000.00718.88
8.0.250.0000.00716.96
8.0.240.0030.00616.93
8.0.230.0030.00316.95
8.0.220.0000.00716.83
8.0.210.0050.00216.79
8.0.200.0000.00616.98
8.0.190.0000.00916.94
8.0.180.0030.00516.88
8.0.170.0040.00416.82
8.0.160.0080.00016.80
8.0.150.0030.00316.82
8.0.140.0030.00416.89
8.0.130.0050.00013.27
8.0.120.0000.00816.84
8.0.110.0000.00916.73
8.0.100.0080.00016.83
8.0.90.0040.00416.77
8.0.80.0070.00716.82
8.0.70.0040.00416.83
8.0.60.0040.00416.68
8.0.50.0060.00316.85
8.0.30.0080.00916.93
8.0.20.0100.01017.40
8.0.10.0040.00417.07
8.0.00.0110.00616.67
7.4.330.0050.00015.55
7.4.320.0030.00316.42
7.4.300.0000.00616.49
7.4.290.0000.00716.57
7.4.280.0050.00316.48
7.4.270.0070.00016.60
7.4.260.0000.00716.60
7.4.250.0050.00216.42
7.4.240.0070.00016.52
7.4.230.0050.00316.39
7.4.220.0060.01216.61
7.4.210.0080.00816.54
7.4.200.0000.00716.63
7.4.160.0110.00516.49
7.4.150.0140.00317.40
7.4.140.0090.01117.86
7.4.130.0220.00816.39
7.4.120.0140.00916.45
7.4.110.0120.00916.43
7.4.100.0120.00916.42
7.4.90.0070.01116.69
7.4.80.0030.01319.39
7.4.70.0140.00316.45
7.4.60.0060.01016.34
7.4.50.0070.00716.29
7.4.40.0170.00716.44
7.4.30.0120.00916.51
7.4.00.0040.01214.91
7.3.330.0030.00313.31
7.3.320.0060.00013.12
7.3.310.0000.00616.20
7.3.300.0040.00416.31
7.3.290.0120.00616.30
7.3.280.0090.00816.29
7.3.270.0160.00317.40
7.3.260.0100.00816.43
7.3.250.0090.00916.42
7.3.240.0080.00916.45
7.3.230.0030.01716.55
7.3.210.0100.00716.29
7.3.200.0090.00616.24
7.3.190.0100.00716.34
7.3.180.0070.01016.32
7.3.170.0160.00616.42
7.3.160.0140.00216.43
7.3.10.0190.00316.27
7.3.00.0130.00316.34
7.2.330.0060.01216.54
7.2.320.0200.00316.25
7.2.310.0130.00416.45
7.2.300.0150.00316.44
7.2.290.0090.00916.69
7.2.130.0100.00716.67
7.2.120.0130.00616.93
7.2.110.0130.01416.94
7.2.100.0130.00316.81
7.2.90.0150.00516.50
7.2.80.0110.00516.54
7.2.70.0200.01316.82
7.2.60.0070.01216.87
7.2.50.0170.00616.56
7.2.40.0120.00916.89
7.2.30.0130.00316.83
7.2.20.0080.00816.72
7.2.10.0070.01116.97
7.2.00.0190.00016.66
7.1.250.0090.00915.76
7.1.200.0000.01015.64
7.1.80.0240.00815.93
7.1.70.0180.00815.00
7.1.60.0300.01333.27
7.1.50.1710.01932.86
7.1.40.1430.01332.39
7.1.30.1880.02032.54
7.1.20.0220.01932.82
7.1.10.0110.01214.89
7.1.00.0060.01514.85
7.0.200.0090.03814.75
7.0.190.0090.01414.88
7.0.180.0210.00514.50
7.0.170.0150.00814.27
7.0.160.0190.00314.41
7.0.150.0070.01514.27
7.0.140.0140.00814.45
7.0.130.0130.00814.64
7.0.120.0150.00914.51
7.0.110.3890.01714.15
7.0.100.0270.00814.42
7.0.90.0090.01414.17
7.0.80.0140.00714.50
7.0.70.0050.01514.32
7.0.60.0130.01014.30
7.0.50.0170.00414.53
7.0.40.0180.00614.57
7.0.30.3300.01014.63
7.0.20.0120.01114.47
7.0.10.0120.01214.53
7.0.00.3160.01314.47

preferences:
32.15 ms | 403 KiB | 5 Q