3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace ns1 { class JsonDumpTransformer{}; }; namespace ns2 { class SingleElementTransformer{}; }; namespace { $lookup = [ 't-JsonDump' => \ns1\JsonDumpTransformer::class, 't-SingleElement' => \ns2\SingleElementTransformer::class, ]; $key = 't-SingleElement'; $class = $lookup[$key]; // Instantiate a object of type \ns1\JsonDumpTransformer #$object = ???; }

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.0070.00718.18
8.3.50.0110.00417.79
8.3.40.0100.00718.80
8.3.30.0070.01418.42
8.3.20.0000.00820.19
8.3.10.0080.00018.78
8.3.00.0040.00420.45
8.2.180.0070.01116.50
8.2.170.0110.00422.96
8.2.160.0160.00320.52
8.2.150.0070.00724.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0050.00220.54
8.2.110.0030.00722.20
8.2.100.0110.00017.91
8.2.90.0080.00022.33
8.2.80.0040.00417.97
8.2.70.0060.00317.93
8.2.60.0040.00417.92
8.2.50.0000.00818.10
8.2.40.0100.00020.49
8.2.30.0070.00019.34
8.2.20.0020.00517.63
8.2.10.0040.00418.11
8.2.00.0000.00718.10
8.1.280.0180.00325.92
8.1.270.0080.00023.97
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00622.48
8.1.230.0110.00020.89
8.1.220.0000.00717.78
8.1.210.0040.00418.82
8.1.200.0060.00317.23
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0040.00418.58
8.1.160.0050.00220.93
8.1.150.0030.00518.81
8.1.140.0040.00417.29
8.1.130.0000.00717.43
8.1.120.0020.00517.33
8.1.110.0040.00417.42
8.1.100.0040.00417.28
8.1.90.0000.00717.30
8.1.80.0050.00317.28
8.1.70.0030.00317.34
8.1.60.0000.00817.40
8.1.50.0000.00817.47
8.1.40.0000.00717.50
8.1.30.0040.00417.61
8.1.20.0000.00817.49
8.1.10.0020.00517.45
8.1.00.0060.00617.43
8.0.300.0050.00219.90
8.0.290.0040.00416.63
8.0.280.0030.00318.31
8.0.270.0030.00316.75
8.0.260.0030.00316.74
8.0.250.0000.00716.79
8.0.240.0070.00016.87
8.0.230.0000.00716.89
8.0.220.0070.00016.75
8.0.210.0070.00016.82
8.0.200.0030.00316.79
8.0.190.0040.00716.77
8.0.180.0070.00016.80
8.0.170.0040.00416.77
8.0.160.0040.00416.77
8.0.150.0000.00716.80
8.0.140.0000.00716.75
8.0.130.0000.00613.18
8.0.120.0000.00816.83
8.0.110.0000.00816.82
8.0.100.0070.00016.73
8.0.90.0080.00016.81
8.0.80.0090.00616.76
8.0.70.0000.00716.84
8.0.60.0040.00416.73
8.0.50.0050.00216.86
8.0.30.0110.00816.86
8.0.20.0090.00917.40
8.0.10.0000.00817.05
8.0.00.0050.01516.70
7.4.330.0050.00015.08
7.4.320.0030.00316.46
7.4.300.0030.00316.44
7.4.290.0030.00316.54
7.4.280.0070.00016.51
7.4.270.0030.00316.52
7.4.260.0110.00016.41
7.4.250.0040.00416.48
7.4.240.0000.00716.48
7.4.230.0040.00416.62
7.4.220.0110.00716.61
7.4.210.0070.00816.43
7.4.200.0040.00416.33
7.4.160.0040.01116.43
7.4.150.0130.01017.40
7.4.140.0050.01417.86
7.4.130.0100.01016.50
7.4.120.0060.01116.38
7.4.110.0070.01116.43
7.4.100.0090.00916.43
7.4.90.0140.00316.30
7.4.80.0090.00819.39
7.4.70.0030.01316.48
7.4.60.0060.00916.33
7.4.50.0100.00316.35
7.4.40.0160.00616.30
7.4.30.0110.00516.30
7.4.00.0070.00714.93
7.3.330.0000.00713.02
7.3.320.0050.00013.10
7.3.310.0040.00416.31
7.3.300.0070.00016.25
7.3.290.0040.00416.11
7.3.280.0050.01316.25
7.3.270.0060.01217.40
7.3.260.0100.00816.28
7.3.250.0110.00816.31
7.3.240.0140.00516.32
7.3.230.0070.01416.43
7.3.210.0040.01416.23
7.3.200.0120.00619.39
7.3.190.0070.01016.61
7.3.180.0120.00316.24
7.3.170.0100.01716.30
7.3.160.0060.01016.30
7.2.330.0050.01316.29
7.2.320.0150.00316.35
7.2.310.0070.01116.39
7.2.300.0100.00716.48
7.2.290.0120.00316.46
7.2.60.0090.00616.79
7.1.200.0100.00015.64
7.1.70.0060.00617.05
7.1.60.0030.00917.19
7.1.50.0100.01016.77
7.1.00.0030.07722.30
7.0.200.0040.00416.67
7.0.60.0400.05719.78
7.0.50.0070.05717.86
7.0.40.0000.05720.13
7.0.30.0170.06020.10
7.0.20.0270.05320.20
7.0.10.0100.05320.12
7.0.00.0070.06320.18
5.6.210.0130.04720.52
5.6.200.0030.08318.14
5.6.190.0130.08320.48
5.6.180.0230.07720.41
5.6.170.0170.05320.48
5.6.160.0000.05320.45
5.6.150.0130.05018.12
5.6.140.0070.06318.23
5.6.130.0030.05318.25
5.6.120.0030.08721.14
5.6.110.0000.04721.11
5.6.100.0070.04320.96
5.6.90.0070.08020.96
5.6.80.0100.07320.38
5.5.350.0270.08020.48
5.5.340.0070.08017.97
5.5.330.0070.04320.27
5.5.320.0430.07720.26
5.5.310.0270.04320.36
5.5.300.0030.08317.98
5.5.290.0030.08018.08
5.5.280.0030.04020.65
5.5.270.0070.07720.93
5.5.260.0100.05320.77
5.5.250.0100.04320.68
5.5.240.0200.07720.13

preferences:
63.2 ms | 401 KiB | 5 Q