3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface SerializableInterface {} interface SomeResizableInterface {} interface IterableInterface {} trait SomeSerializableTrait {function t2() {} } trait SomeOtherSerializableTrait { function t() {} } class SomeContainer implements SerializableInterface, IterableInterface { use SomeSerializableTrait; } class SomeOtherContainer extends SomeContainer implements SomeResizableInterface { use SomeOtherSerializableTrait; } $someContainer = new SomeContainer; testInterface($someOtherContainer); $someOtherContainer = new SomeOtherContainer; var_dump($someContainer instanceof SerializableInterface); var_dump($someOtherContainer instanceof SerializableInterface); var_dump($someOtherContainer instanceof SomeSerializableTrait); var_dump($someOtherContainer instanceof SomeOtherSerializableTrait); // type hint it function testTrait(SomeSerializableTrait $container) {} function testOtherTrait(SomeOtherSerializableTrait $container) {} function testInterface(SomeResizableInterface $container) {} testInterface($someOtherContainer); testOtherTrait($someOtherContainer); testTrait($someOtherContainer);

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.40.0150.00618.82
8.3.30.0120.00318.79
8.3.20.0040.00420.33
8.3.10.0000.00821.91
8.3.00.0050.00319.56
8.2.170.0100.01022.96
8.2.160.0070.00722.13
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0060.00317.75
8.2.110.0090.00021.06
8.2.100.0120.00018.00
8.2.90.0000.00819.18
8.2.80.0050.00317.97
8.2.70.0070.00317.63
8.2.60.0030.00617.80
8.2.50.0050.00518.07
8.2.40.0000.00821.19
8.2.30.0000.00819.88
8.2.20.0020.00517.65
8.2.10.0040.00418.04
8.2.00.0060.00318.07
8.1.270.0040.00422.16
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0040.00421.43
8.1.230.0110.00417.77
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0060.00317.48
8.1.190.0040.00417.35
8.1.180.0060.00318.10
8.1.170.0000.00818.64
8.1.160.0060.00322.09
8.1.150.0000.00818.84
8.1.140.0040.00417.52
8.1.130.0000.00717.72
8.1.120.0040.00417.54
8.1.110.0040.00417.52
8.1.100.0040.00417.49
8.1.90.0020.00517.53
8.1.80.0000.00817.38
8.1.70.0050.00317.54
8.1.60.0000.00817.50
8.1.50.0040.00417.42
8.1.40.0000.00817.56
8.1.30.0080.00017.51
8.1.20.0050.00217.72
8.1.10.0000.01017.57
8.1.00.0040.00417.61
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0030.00318.39
8.0.270.0040.00417.14
8.0.260.0000.00617.18
8.0.250.0080.00017.01
8.0.240.0000.00716.91
8.0.230.0070.00016.95
8.0.220.0000.00716.88
8.0.210.0070.00016.97
8.0.200.0030.00317.00
8.0.190.0030.00617.02
8.0.180.0000.00716.97
8.0.170.0040.00417.00
8.0.160.0070.00017.07
8.0.150.0000.00717.00
8.0.140.0040.00416.95
8.0.130.0000.00613.39
8.0.120.0050.00316.84
8.0.110.0080.00016.98
8.0.100.0080.00016.98
8.0.90.0050.00216.97
8.0.80.0080.00816.94
8.0.70.0030.00516.84
8.0.60.0000.00716.93
8.0.50.0000.00816.78
8.0.30.0140.00717.21
8.0.20.0110.01017.40
8.0.10.0060.00317.06
8.0.00.0100.00916.82
7.4.330.0070.00015.08
7.4.320.0000.00616.61
7.4.300.0040.00416.43
7.4.290.0070.00016.64
7.4.280.0040.00416.55
7.4.270.0000.00716.52
7.4.260.0080.00316.62
7.4.250.0070.00016.57
7.4.240.0040.00416.57
7.4.230.0070.00016.63
7.4.220.0100.01016.71
7.4.210.0100.01016.49
7.4.200.0000.00716.53
7.4.160.0090.00616.58
7.4.150.0030.01417.40
7.4.140.0100.00817.86
7.4.130.0100.01216.62
7.4.120.0140.00316.51
7.4.110.0000.01716.45
7.4.100.0130.00416.49
7.4.90.0030.01416.67
7.4.80.0030.01619.39
7.4.70.0030.01316.54
7.4.60.0100.00716.63
7.4.50.0050.00316.65
7.4.40.0150.00816.24
7.4.30.0070.01616.52
7.4.00.0040.01114.97
7.3.330.0000.00613.34
7.3.320.0030.00313.33
7.3.310.0060.00316.30
7.3.300.0040.00416.25
7.3.290.0070.00916.31
7.3.280.0100.00916.31
7.3.270.0090.00817.40
7.3.260.0090.00916.53
7.3.250.0070.00916.35
7.3.240.0100.01016.28
7.3.230.0100.01016.40
7.3.210.0170.00016.25
7.3.200.0120.00316.63
7.3.190.0110.00516.36
7.3.180.0060.01216.46
7.3.170.0030.01716.37
7.3.160.0100.01016.38
7.3.00.0070.00816.42
7.2.330.0110.00716.70
7.2.320.0130.00916.63
7.2.310.0070.01016.66
7.2.300.0070.01016.43
7.2.290.0040.01816.75
7.2.130.0140.00916.97
7.2.120.0110.01116.61
7.2.110.0100.01016.64
7.2.100.0070.01016.81
7.2.90.0190.00516.54
7.2.80.0160.00616.93
7.2.70.0130.00816.84
7.2.60.0050.01216.63
7.2.50.0000.01116.69
7.2.40.0070.00717.07
7.2.30.0130.00016.91
7.2.20.0060.00916.77
7.2.10.0060.00916.96
7.2.00.0050.01218.24
7.1.250.0140.00415.57
7.1.240.0080.00515.66
7.1.230.0130.00315.69
7.1.220.0130.01015.66
7.1.210.0130.00615.60
7.1.200.0100.00615.57
7.1.190.0110.00915.67
7.1.180.0040.00815.52
7.1.170.0040.01115.36
7.1.160.0040.00415.46
7.1.150.0080.00015.40
7.1.140.0100.00315.82
7.1.130.0030.01315.82
7.1.120.0130.00315.89
7.1.110.0030.01315.74
7.1.100.0090.00316.84
7.1.90.0040.00415.77
7.1.80.0060.00315.80
7.1.70.0030.00516.46
7.1.60.0070.01017.90
7.1.50.0070.01216.42
7.1.40.0060.00615.62
7.1.30.0040.00815.78
7.1.20.0030.00915.79
7.1.10.0090.00015.87
7.1.00.0030.04319.08
7.0.330.0150.00015.49
7.0.320.0120.00915.41
7.0.310.0090.01215.42
7.0.300.0050.00315.37
7.0.290.0100.00315.27
7.0.280.0070.00715.46
7.0.270.0150.00015.30
7.0.260.0070.00015.42
7.0.250.0060.00615.36
7.0.240.0080.00415.39
7.0.230.0030.00915.36
7.0.220.0040.01415.39
7.0.210.0030.00515.25
7.0.200.0250.00215.07
7.0.190.0060.00915.48
7.0.180.0060.00915.06
7.0.170.0000.00715.21
7.0.160.0090.00615.23
7.0.150.0040.00415.30
7.0.140.0080.00515.56
7.0.130.0130.00015.25
7.0.120.0060.00915.28
7.0.110.0070.00315.22
7.0.100.0000.01115.37
7.0.90.0110.00415.26
7.0.80.0070.00715.27
7.0.70.0070.00715.32
7.0.60.0040.04417.73
7.0.50.0000.04816.67
7.0.40.0040.02616.72
7.0.30.0170.03316.76
7.0.20.0150.04316.79
7.0.10.0100.04516.80
7.0.00.0050.04816.82
5.6.380.0130.00314.63
5.6.370.0130.00314.52
5.6.360.0040.00814.14
5.6.350.0040.00814.43
5.6.340.0080.00014.47
5.6.330.0000.00814.59
5.6.320.0030.00614.17
5.6.310.0040.01114.19
5.6.300.0030.01014.07
5.6.290.0070.00714.59
5.6.280.0020.02517.63
5.6.270.0030.00513.97
5.6.260.0030.01014.23
5.6.250.0100.00314.34
5.6.240.0070.00414.51
5.6.230.0090.00414.31
5.6.220.0140.00014.26
5.6.210.0080.04017.36
5.6.200.0000.03016.16
5.6.190.0080.02117.47
5.6.180.0040.03017.30
5.6.170.0150.03517.41
5.6.160.0050.03917.33
5.6.150.0050.03716.13
5.6.140.0090.04316.22
5.6.130.0030.02716.46
5.6.120.0130.02317.74
5.6.110.0080.03817.65
5.6.100.0090.02917.69
5.6.90.0020.04017.67
5.6.80.0080.04417.45
5.6.70.0030.01014.25
5.6.60.0070.00714.17
5.6.50.0060.01014.21
5.6.40.0030.01014.46
5.6.30.0040.01114.08
5.6.20.0070.00714.32
5.6.10.0040.00914.24
5.6.00.0120.00314.05
5.5.380.0060.00611.42
5.5.370.0000.00911.31
5.5.360.0050.00311.30
5.5.350.0020.04415.81
5.5.340.0030.02414.61
5.5.330.0060.04315.80
5.5.320.0130.02015.68
5.5.310.0150.03215.76
5.5.300.0050.04214.62
5.5.290.0030.02314.56
5.5.280.0070.04216.08
5.5.270.0030.04516.08
5.5.260.0030.03316.07
5.5.250.0050.02615.89
5.5.240.0080.03515.72
5.5.230.0030.01011.18
5.5.220.0100.00311.18
5.5.210.0000.00811.18
5.5.200.0030.00611.26
5.5.190.0000.01211.18
5.5.180.0040.00811.19
5.5.170.0000.01111.18
5.5.160.0060.00611.18
5.5.150.0080.00611.18
5.5.140.0030.00711.19
5.5.130.0060.00611.18
5.5.120.0040.00811.18
5.5.110.0030.00711.30
5.5.100.0000.01011.18
5.5.90.0000.01111.18
5.5.80.0000.01111.23
5.5.70.0030.00611.18
5.5.60.0000.01211.18
5.5.50.0000.01111.18
5.5.40.0040.00411.18
5.5.30.0000.00711.18
5.5.20.0030.00711.18
5.5.10.0030.00711.18
5.5.00.0000.01311.18
5.4.450.0500.03015.38
5.4.440.0510.03315.38
5.4.430.0480.03515.39
5.4.420.0500.03315.33
5.4.410.0410.03315.37
5.4.400.0570.03415.16
5.4.390.0610.03015.05
5.4.380.0450.03415.20
5.4.370.0410.02915.16
5.4.360.0420.02815.27
5.4.350.0380.03315.22
5.4.340.0450.02715.22
5.4.330.0000.00611.18
5.4.320.0400.03015.20
5.4.310.0450.02315.09
5.4.300.0400.02815.01
5.4.290.0430.03015.25
5.4.280.0450.03015.21
5.4.270.0590.03715.22
5.4.260.0520.02515.25
5.4.250.0500.02515.15
5.4.240.0470.02715.21
5.4.230.0450.02915.07
5.4.220.0450.02715.20
5.4.210.0470.02715.14
5.4.200.0450.03115.07
5.4.190.0480.02515.09
5.4.180.0470.02515.16
5.4.170.0500.03115.07
5.4.160.0560.02815.08
5.4.150.0510.02815.21
5.4.140.0520.02713.87
5.4.130.0550.02213.74
5.4.120.0430.03313.75
5.4.110.0520.03013.81
5.4.100.0470.02213.73
5.4.90.0430.02313.88
5.4.80.0530.02513.71
5.4.70.0130.03713.87
5.4.60.0100.04213.80
5.4.50.0110.03013.87
5.4.40.0170.03313.76
5.4.30.0030.03813.78
5.4.20.0050.02613.75
5.4.10.0150.03213.87
5.4.00.0100.00311.18

preferences:
44.07 ms | 400 KiB | 5 Q