3v4l.org

run code in 300+ PHP versions simultaneously
<?php //var_dump(get_defined_constants(true)['Core']); class Foo { const ERR_SOME_CONST = 6001; const ERR_SOME_OTHER_CONST = 5001; function bar() { $x = 6001; $fooClass = new ReflectionClass ( 'Foo' ); $constants = $fooClass->getConstants(); $constants = get_defined_constants(); $constName = null; foreach ( $constants as $name => $value ) { if ( $value == $x ) { $constName = $name; break; } } echo $constName; } } echo (new Foo)->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.40.0090.00618.79
8.3.30.0070.01020.21
8.3.20.0080.00020.41
8.3.10.0050.00321.97
8.3.00.0080.00022.43
8.2.170.0080.00622.96
8.2.160.0070.00722.16
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0070.00020.79
8.2.110.0130.00322.25
8.2.100.0040.00817.84
8.2.90.0050.00319.17
8.2.80.0040.00419.50
8.2.70.0030.00617.38
8.2.60.0000.00817.93
8.2.50.0060.00318.07
8.2.40.0040.00418.28
8.2.30.0000.00719.54
8.2.20.0040.00417.66
8.2.10.0040.00417.75
8.2.00.0000.00817.91
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0030.00623.88
8.1.230.0000.01119.10
8.1.220.0080.00017.74
8.1.210.0030.00618.77
8.1.200.0060.00317.48
8.1.190.0040.00417.51
8.1.180.0030.00618.10
8.1.170.0000.00818.70
8.1.160.0000.00719.02
8.1.150.0070.00318.81
8.1.140.0030.00617.68
8.1.130.0050.00317.99
8.1.120.0080.00017.57
8.1.110.0000.00717.57
8.1.100.0030.00517.44
8.1.90.0080.00017.55
8.1.80.0040.00417.60
8.1.70.0000.00717.48
8.1.60.0040.00417.68
8.1.50.0030.00517.48
8.1.40.0030.00517.53
8.1.30.0000.00717.76
8.1.20.0030.00517.81
8.1.10.0050.00317.69
8.1.00.0070.00317.64
8.0.300.0080.00018.77
8.0.290.0040.00417.18
8.0.280.0060.00018.48
8.0.270.0030.00317.26
8.0.260.0000.00716.96
8.0.250.0000.00717.11
8.0.240.0000.00817.02
8.0.230.0030.00317.00
8.0.220.0030.00516.93
8.0.210.0000.00717.08
8.0.200.0030.00317.06
8.0.190.0030.00617.13
8.0.180.0000.00816.93
8.0.170.0040.00416.93
8.0.160.0000.00716.94
8.0.150.0000.00817.00
8.0.140.0000.00716.98
8.0.130.0030.00313.36
8.0.120.0040.00416.92
8.0.110.0080.00017.04
8.0.100.0040.00417.11
8.0.90.0050.00216.90
8.0.80.0090.00617.04
8.0.70.0040.00417.09
8.0.60.0080.00017.00
8.0.50.0000.00717.12
8.0.30.0110.01016.98
8.0.20.0090.01017.40
8.0.10.0050.00317.02
8.0.00.0070.01216.82
7.4.330.0060.00015.00
7.4.320.0030.00316.70
7.4.300.0000.00616.72
7.4.290.0050.00316.73
7.4.280.0000.00816.69
7.4.270.0050.00316.58
7.4.260.0030.00313.36
7.4.250.0050.00216.69
7.4.240.0030.00416.64
7.4.230.0000.00816.72
7.4.220.0100.00916.70
7.4.210.0070.00716.75
7.4.200.0030.00316.63
7.4.190.0030.00316.68
7.4.160.0130.00416.67
7.4.150.0130.00317.40
7.4.140.0100.00817.86
7.4.130.0120.00816.76
7.4.120.0070.01016.55
7.4.110.0180.00016.44
7.4.100.0070.01016.76
7.4.90.0150.00316.67
7.4.80.0150.00419.39
7.4.70.0060.01016.71
7.4.60.0070.01016.70
7.4.50.0000.00816.63
7.4.40.0030.01422.77
7.4.30.0060.01316.75
7.4.10.0090.00915.02
7.4.00.0040.01315.08
7.3.330.0050.00013.30
7.3.320.0000.00513.43
7.3.310.0040.00416.38
7.3.300.0000.00716.53
7.3.290.0090.00916.56
7.3.280.0100.00816.46
7.3.270.0090.00917.40
7.3.260.0070.01016.70
7.3.250.0100.01016.50
7.3.240.0100.01016.53
7.3.230.0090.00816.75
7.3.210.0080.01216.69
7.3.200.0150.00819.39
7.3.190.0130.00916.64
7.3.180.0070.01316.68
7.3.170.0150.00616.48
7.3.160.0120.00916.68
7.3.130.0070.00914.92
7.3.120.0090.00914.96
7.3.110.0080.01215.04
7.3.100.0050.01214.97
7.3.90.0070.00914.90
7.3.80.0050.00715.08
7.3.70.0100.00615.00
7.3.60.0030.01115.02
7.3.50.0040.00714.85
7.3.40.0050.00815.00
7.3.30.0050.01014.85
7.3.20.0070.00716.53
7.3.10.0040.00916.68
7.3.00.0050.00716.71
7.2.330.0160.00316.95
7.2.320.0030.01316.96
7.2.310.0070.01016.53
7.2.300.0070.01016.80
7.2.290.0100.00616.81
7.2.260.0040.01415.20
7.2.250.0080.01115.03
7.2.240.0060.01015.19
7.2.230.0070.00715.10
7.2.220.0050.00815.07
7.2.210.0050.00615.20
7.2.200.0060.01015.33
7.2.190.0040.01015.23
7.2.180.0040.00815.02
7.2.170.0100.00615.17
7.2.160.0070.00615.02
7.2.150.0060.00817.01
7.2.140.0040.00916.87
7.2.130.0040.00716.95
7.2.120.0030.01016.95
7.2.110.0050.00816.78
7.2.100.0050.00916.88
7.2.90.0070.00917.07
7.2.80.0080.00817.00
7.2.70.0060.00616.98
7.2.60.0050.00916.87
7.2.50.0040.00916.98
7.2.40.0070.00617.02
7.2.30.0090.00516.96
7.2.20.0070.00816.98
7.2.10.0050.00816.86
7.2.00.0080.00516.93
7.1.330.0040.00815.80
7.1.320.0080.00715.94
7.1.310.0040.00915.83
7.1.300.0040.01015.86
7.1.290.0060.00415.65
7.1.280.0060.00615.97
7.1.270.0050.00815.74
7.1.260.0040.00815.85
7.1.250.0090.00515.73
7.1.240.0050.00815.76
7.1.230.0060.00715.70
7.1.220.0050.01015.70
7.1.210.0050.00915.94
7.1.200.0070.00815.78
7.1.190.0050.01015.75
7.1.180.0080.00615.64
7.1.170.0040.00815.99
7.1.160.0070.00815.68
7.1.150.0030.00815.77
7.1.140.0080.00515.85
7.1.130.0050.00715.79
7.1.120.0040.00915.90
7.1.110.0040.01015.85
7.1.100.0040.00716.40
7.1.90.0060.00615.87
7.1.80.0050.00715.87
7.1.70.0060.00616.03
7.1.60.0060.00916.71
7.1.50.0080.00720.70
7.1.40.0040.00915.84
7.1.30.0050.01015.75
7.1.20.0080.00715.74
7.1.10.0050.00815.75
7.1.00.0050.01617.42
7.0.330.0060.00815.39
7.0.320.0040.00815.42
7.0.310.0050.00815.40
7.0.300.0060.00915.32
7.0.290.0030.01215.47
7.0.280.0030.00715.35
7.0.270.0060.00415.33
7.0.260.0020.01115.20
7.0.250.0070.00815.33
7.0.240.0040.00915.43
7.0.230.0040.00815.29
7.0.220.0080.00915.48
7.0.210.0100.00415.38
7.0.200.0050.00815.69
7.0.190.0040.01015.50
7.0.180.0040.00815.35
7.0.170.0050.00815.38
7.0.160.0090.00715.44
7.0.150.0090.00415.37
7.0.140.0060.02517.11
7.0.130.0050.00515.35
7.0.120.0040.01015.38
7.0.110.0080.00715.50
7.0.100.0100.02516.57
7.0.90.0050.02816.53
7.0.80.0070.02216.55
7.0.70.0100.02416.46
7.0.60.0070.02616.65
7.0.50.0140.02516.77
7.0.40.0070.01615.08
7.0.30.0090.01215.03
7.0.20.0050.01715.08
7.0.10.0050.01414.97
7.0.00.0060.01614.96
5.6.400.0080.00514.33
5.6.390.0040.01014.34
5.6.380.0100.00314.22
5.6.370.0040.00914.20
5.6.360.0080.00514.39
5.6.350.0040.01214.50
5.6.340.0080.00514.44
5.6.330.0090.00514.53
5.6.320.0050.00914.35
5.6.310.0030.01114.53
5.6.300.0080.00614.39
5.6.290.0070.00914.49
5.6.280.0070.02116.03
5.6.270.0050.00914.32
5.6.260.0040.00814.54
5.6.250.0030.02715.88
5.6.240.0080.02316.02
5.6.230.0080.02315.96
5.6.220.0040.01715.96
5.6.210.0070.01616.01
5.6.200.0080.02616.04
5.6.190.0050.02516.17
5.6.180.0090.01916.06
5.6.170.0030.02116.09
5.6.160.0030.01716.00
5.6.150.0060.01416.00
5.6.140.0070.01516.06
5.6.130.0070.01216.20
5.6.120.0060.02516.03
5.6.110.0080.02416.00
5.6.100.0050.02815.95
5.6.90.0080.01415.81
5.6.80.0040.01915.79
5.6.70.0050.01615.73
5.6.60.0060.01615.75
5.6.50.0080.02315.80
5.6.40.0060.01515.83
5.6.30.0080.01315.78
5.6.20.0060.01715.88
5.6.10.0110.01915.83
5.6.00.0060.02015.87
5.5.380.0090.02415.65
5.5.370.0050.02615.80
5.5.360.0060.02615.83
5.5.350.0050.01715.85
5.5.340.0070.02415.96
5.5.330.0080.01015.90
5.5.320.0080.01415.92
5.5.310.0110.01815.87
5.5.300.0050.01515.96
5.5.290.0070.01915.87
5.5.280.0060.01715.96
5.5.270.0080.02115.87
5.5.260.0040.02515.88
5.5.250.0090.01815.82
5.5.240.0050.01615.76
5.5.230.0070.01615.66
5.5.220.0080.01515.71
5.5.210.0080.01415.65
5.5.200.0080.01415.67
5.5.190.0040.01715.84
5.5.180.0030.02415.70
5.5.170.0040.01014.29
5.5.160.0030.01915.70
5.5.150.0060.01215.86
5.5.140.0050.01515.78
5.5.130.0040.01615.61
5.5.120.0080.02015.86
5.5.110.0100.01315.88
5.5.100.0030.01615.76
5.5.90.0030.01515.82
5.5.80.0060.01515.79
5.5.70.0050.01415.60
5.5.60.0040.01615.74
5.5.50.0050.01815.66
5.5.40.0060.01315.63
5.5.30.0070.02415.54
5.5.20.0060.02515.77
5.5.10.0110.02015.70
5.5.00.0050.02715.59
5.4.450.0030.01313.26
5.4.440.0040.01713.26
5.4.430.0040.02613.19
5.4.420.0020.02113.32
5.4.410.0060.01513.34
5.4.400.0030.01213.26
5.4.390.0040.01713.06
5.4.380.0030.01313.31
5.4.370.0050.01413.10
5.4.360.0030.01613.17
5.4.350.0040.01513.22
5.4.340.0060.01313.25
5.4.330.0050.00811.18
5.4.320.0050.01213.30
5.4.310.0060.01413.21
5.4.300.0040.01413.26
5.4.290.0050.02213.27
5.4.280.0040.01513.23
5.4.270.0060.01113.21
5.4.260.0050.01313.19
5.4.250.0060.01513.18
5.4.240.0050.01213.11
5.4.230.0040.01613.13
5.4.220.0040.01713.16
5.4.210.0070.02013.25
5.4.200.0020.01513.15
5.4.190.0060.01713.14
5.4.180.0070.01813.08
5.4.170.0090.01313.13
5.4.160.0030.02513.17
5.4.150.0030.02113.16
5.4.140.0050.01412.59
5.4.130.0050.02112.58
5.4.120.0060.02212.53
5.4.110.0050.02312.66
5.4.100.0050.02512.45
5.4.90.0050.02012.55
5.4.80.0030.01712.49
5.4.70.0040.02412.55
5.4.60.0060.01212.53
5.4.50.0070.02012.53
5.4.40.0050.02012.53
5.4.30.0040.02312.51
5.4.20.0060.02012.54
5.4.10.0050.01912.52
5.4.00.0060.02112.29
5.3.290.0040.02111.88
5.3.280.0040.01311.88
5.3.270.0070.01911.88
5.3.260.0060.02211.90
5.3.250.0070.02311.89
5.3.240.0040.01411.89
5.3.230.0040.02011.87
5.3.220.0080.02111.89
5.3.210.0050.02311.86
5.3.200.0050.02111.86
5.3.190.0020.02611.89
5.3.180.0080.01511.89
5.3.170.0060.02211.88
5.3.160.0060.02011.89
5.3.150.0050.02111.91
5.3.140.0040.02411.87
5.3.130.0050.01911.91
5.3.120.0070.02211.88
5.3.110.0050.02111.89
5.3.100.0050.01411.73
5.3.90.0060.02211.75
5.3.80.0080.01111.71
5.3.70.0030.02111.71
5.3.60.0070.01811.76
5.3.50.0060.02211.74
5.3.40.0030.02611.75
5.3.30.0040.01511.68
5.3.20.0020.02411.63
5.3.10.0040.02311.64
5.3.00.0070.01911.65
5.2.170.0070.04011.16
5.2.160.0070.05711.21
5.2.150.0070.06311.07
5.2.140.0100.05311.17
5.2.130.0100.05711.22
5.2.120.0030.06011.11
5.2.110.0030.06311.11
5.2.100.0100.05011.08
5.2.90.0030.04010.99
5.2.80.0070.06011.08
5.2.70.0130.05311.18
5.2.60.0100.05711.18
5.2.50.0000.04010.95
5.2.40.0070.05011.06
5.2.30.0030.06011.11
5.2.20.0070.02710.82
5.2.10.0130.05010.88
5.2.00.0100.05710.72
5.1.60.0000.04010.08
5.1.50.0000.05010.08
5.1.40.0000.05710.04
5.1.30.0100.04010.45
5.1.20.0030.05310.31
5.1.10.0100.0479.95
5.1.00.0070.0509.95
5.0.50.0000.0479.87
5.0.40.0030.0339.87
5.0.30.0030.0639.87
5.0.20.0030.0239.87
5.0.10.0000.0479.87
5.0.00.0070.0639.87
4.4.90.0030.0179.87
4.4.80.0100.0179.87
4.4.70.0070.0339.87
4.4.60.0000.0309.87
4.4.50.0030.0339.87
4.4.40.0000.0479.87
4.4.30.0000.0379.87
4.4.20.0030.0339.87
4.4.10.0030.0239.87
4.4.00.0000.0579.87
4.3.110.0030.0339.87
4.3.100.0000.0379.87
4.3.90.0030.0339.87
4.3.80.0000.0579.87
4.3.70.0000.0409.87
4.3.60.0030.0339.87
4.3.50.0000.0379.87
4.3.40.0070.0479.87
4.3.30.0000.0339.87
4.3.20.0030.0179.87
4.3.10.0030.0209.87
4.3.00.0000.0379.87

preferences:
42.91 ms | 400 KiB | 5 Q