3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const ABC♥ = "alphabet"; } $class = new ReflectionClass("Test"); $bad_char = "♥"; $constants = $class->getConstants(); $keys = array_keys($constants); for ( $i=0, $ct=count($keys); $i < $ct; $i++) { $target = $keys[ $i ]; //php5.6: if ( mb_substr( $target, -1,1) == $bad_char ) { if ( strpos( $target, $badchar) !== FALSE ) { trigger_error( "'$bad_char' in '$target'" ); }}

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.0040.01116.63
8.3.50.0060.01222.85
8.3.40.0070.00718.79
8.3.30.0070.00718.89
8.3.20.0040.00420.34
8.3.10.0040.00423.69
8.3.00.0000.00819.51
8.2.180.0030.01317.00
8.2.170.0070.01122.96
8.2.160.0140.00720.53
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.00
8.2.110.0060.00322.29
8.2.100.0100.00317.84
8.2.90.0040.00419.30
8.2.80.0080.00017.97
8.2.70.0080.00017.75
8.2.60.0080.00017.93
8.2.50.0080.00018.07
8.2.40.0000.00718.09
8.2.30.0000.00718.23
8.2.20.0040.00417.88
8.2.10.0000.00818.21
8.2.00.0040.00417.86
8.1.280.0090.00625.92
8.1.270.0040.00823.77
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00323.71
8.1.230.0070.00419.16
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0070.00317.35
8.1.190.0040.00417.10
8.1.180.0030.00518.10
8.1.170.0000.00818.66
8.1.160.0000.00722.13
8.1.150.0000.00718.96
8.1.140.0000.00717.45
8.1.130.0030.00317.82
8.1.120.0000.00717.51
8.1.110.0040.00417.41
8.1.100.0040.00417.49
8.1.90.0000.00717.36
8.1.80.0040.00417.42
8.1.70.0080.00017.42
8.1.60.0030.00617.57
8.1.50.0040.00417.41
8.1.40.0050.00317.48
8.1.30.0030.00617.64
8.1.20.0040.00417.55
8.1.10.0040.00417.58
8.1.00.0080.00017.51
8.0.300.0080.00018.77
8.0.290.0000.00816.75
8.0.280.0030.00318.36
8.0.270.0030.00317.18
8.0.260.0060.00017.27
8.0.250.0000.00617.02
8.0.240.0040.00417.05
8.0.230.0000.00716.86
8.0.220.0000.00716.82
8.0.210.0050.00216.84
8.0.200.0040.00417.02
8.0.190.0000.00817.02
8.0.180.0070.00017.00
8.0.170.0000.00816.97
8.0.160.0040.00416.97
8.0.150.0060.00316.94
8.0.140.0050.00216.85
8.0.130.0090.00013.38
8.0.120.0040.00416.90
8.0.110.0000.00816.98
8.0.100.0040.00416.90
8.0.90.0000.00716.80
8.0.80.0180.00417.00
8.0.70.0000.00717.08
8.0.60.0040.00416.93
8.0.50.0080.00016.90
8.0.30.0110.01016.98
8.0.20.0120.00817.42
8.0.10.0040.00417.08
8.0.00.0100.01016.79
7.4.330.0020.00215.07
7.4.320.0000.00616.53
7.4.300.0030.00316.55
7.4.290.0030.00316.41
7.4.280.0030.00516.41
7.4.270.0030.00316.48
7.4.260.0000.00716.63
7.4.250.0000.00716.49
7.4.240.0050.00216.48
7.4.230.0000.00816.50
7.4.220.0140.00416.41
7.4.210.0030.01016.46
7.4.200.0000.00716.35
7.4.160.0080.00816.72
7.4.150.0120.00617.40
7.4.140.0100.00917.86
7.4.130.0070.01016.58
7.4.120.0060.01316.56
7.4.110.0110.00816.63
7.4.100.0140.00416.54
7.4.90.0100.01016.55
7.4.80.0060.01319.39
7.4.70.0100.00716.49
7.4.60.0100.00716.40
7.4.50.0000.00816.64
7.4.40.0130.00616.54
7.4.30.0110.00416.41
7.4.00.0040.01115.00
7.3.330.0040.00413.39
7.3.320.0070.00013.38
7.3.310.0000.00816.35
7.3.300.0030.00316.39
7.3.290.0060.00916.35
7.3.280.0130.00616.38
7.3.270.0160.00417.40
7.3.260.0160.00616.33
7.3.250.0080.00816.44
7.3.240.0060.01316.43
7.3.230.0030.01316.46
7.3.210.0060.01016.41
7.3.200.0100.00719.39
7.3.190.0140.01016.52
7.3.180.0090.00616.43
7.3.170.0100.00716.49
7.3.160.0060.00916.34
7.3.10.0100.00316.12
7.3.00.0140.00016.32
7.2.330.0080.00816.66
7.2.320.0180.00016.71
7.2.310.0140.00316.73
7.2.300.0030.01416.37
7.2.290.0080.00816.43
7.2.130.0070.01016.88
7.2.120.0090.00017.03
7.2.110.0000.01417.03
7.2.100.0030.01416.87
7.2.90.0030.01016.76
7.2.80.0000.01216.64
7.2.70.0030.01416.80
7.2.60.0070.00416.86
7.2.50.0140.00316.85
7.2.40.0090.00616.66
7.2.30.0060.01016.86
7.2.20.0060.00616.93
7.2.10.0030.01416.90
7.2.00.0060.00818.16
7.1.250.0070.00715.53
7.1.100.0040.00917.78
7.1.70.0060.00317.30
7.1.60.0090.01519.40
7.1.50.0110.00717.07
7.1.00.0000.07322.40
7.0.200.0190.00414.98
7.0.140.0170.06021.99
7.0.60.0070.09020.07
7.0.50.0030.08317.85
7.0.40.0070.05319.96
7.0.30.0330.03720.13
7.0.20.0470.06020.34
7.0.10.0100.08320.10
7.0.00.0070.04020.12
5.6.210.0270.06020.66
5.6.200.0070.08018.16
5.6.190.0070.08320.39
5.6.180.0270.04020.69
5.6.170.0230.06020.48
5.6.160.0070.05020.55
5.6.150.0170.04718.23
5.6.140.0130.07718.14
5.6.130.0100.08318.15
5.6.120.0130.07021.05
5.6.110.0030.04321.00
5.6.100.0100.07321.03
5.6.90.0130.08020.95
5.6.80.0100.07320.42
5.5.350.0200.04720.42
5.5.340.0030.04017.92
5.5.330.0170.07320.25
5.5.320.0200.05720.36
5.5.310.0270.03720.27
5.5.300.0100.08018.08
5.5.290.0070.06318.08
5.5.280.0000.05020.68
5.5.270.0100.08320.76
5.5.260.0070.08720.79
5.5.250.0170.08020.58
5.5.240.0070.07720.18
5.4.450.0100.06319.59
5.4.440.0500.05719.44
5.4.430.0730.05319.59
5.4.420.0600.06019.54
5.4.410.0070.05318.97
5.4.400.0330.06018.87
5.4.390.0430.06018.78
5.4.380.0100.05318.79
5.4.370.0070.03718.59
5.4.360.0070.05018.57
5.4.350.0050.04012.01
5.4.340.0070.03312.01
5.4.320.0060.03612.49
5.4.310.0050.03812.49
5.4.300.0050.03612.50
5.4.290.0090.04212.50
5.4.280.0080.03312.39
5.4.270.0060.03612.39
5.4.260.0070.03712.39
5.4.250.0080.03412.39
5.4.240.0040.03712.39
5.4.230.0080.04212.38
5.4.220.0060.04012.38
5.4.210.0050.03512.39
5.4.200.0030.04012.38
5.4.190.0050.03612.38
5.4.180.0020.03812.38
5.4.170.0060.03512.39
5.4.160.0060.03812.39
5.4.150.0070.03712.39
5.4.140.0080.03612.06
5.4.130.0070.03412.06
5.4.120.0030.03712.01
5.4.110.0060.03412.00
5.4.100.0060.03512.00
5.4.90.0080.04212.00
5.4.80.0090.03412.01
5.4.70.0040.03412.00
5.4.60.0060.04512.00
5.4.50.0040.03612.00
5.4.40.0100.03011.99
5.4.30.0060.03911.99
5.4.20.0040.03711.99
5.4.10.0080.03211.99
5.4.00.0070.03811.48
5.3.290.0070.04612.80
5.3.280.0090.03612.71
5.3.270.0090.04112.72
5.3.260.0060.03912.72
5.3.250.0040.03912.72
5.3.240.0120.03112.72
5.3.230.0040.03912.71
5.3.220.0060.03612.68
5.3.210.0060.03812.68
5.3.200.0040.03812.68
5.3.190.0020.04112.68
5.3.180.0050.03612.68
5.3.170.0060.03612.67
5.3.160.0050.03712.68
5.3.150.0060.03712.67
5.3.140.0050.03712.66
5.3.130.0050.04012.66
5.3.120.0070.04412.66
5.3.110.0090.03412.65
5.3.100.0070.04012.12
5.3.90.0070.03412.09
5.3.80.0080.04012.09
5.3.70.0070.03412.09
5.3.60.0060.04112.07
5.3.50.0030.03912.02
5.3.40.0080.03312.02
5.3.30.0030.03711.97
5.3.20.0080.03211.75
5.3.10.0060.03411.72
5.3.00.0050.03611.71
5.2.170.0040.0309.21
5.2.160.0040.0299.21
5.2.150.0040.0319.21
5.2.140.0030.0329.21
5.2.130.0050.0299.17
5.2.120.0060.0279.17
5.2.110.0050.0289.18
5.2.100.0040.0359.17
5.2.90.0020.0329.18
5.2.80.0060.0329.16
5.2.70.0050.0379.16
5.2.60.0080.0289.12
5.2.50.0060.0289.09
5.2.40.0030.0369.07
5.2.30.0060.0309.04
5.2.20.0060.0279.03
5.2.10.0020.0298.94
5.2.00.0030.0298.80
5.1.60.0070.0288.08
5.1.50.0030.0268.07
5.1.40.0040.0248.06
5.1.30.0010.0288.41
5.1.20.0080.0248.43
5.1.10.0090.0238.16
5.1.00.0060.0238.16
5.0.50.0040.0206.65
5.0.40.0030.0196.50
5.0.30.0040.0306.32
5.0.20.0050.0176.28
5.0.10.0030.0206.26
5.0.00.0040.0296.25
4.4.90.0040.0164.78
4.4.80.0020.0154.75
4.4.70.0030.0204.75
4.4.60.0040.0174.76
4.4.50.0030.0184.77
4.4.40.0050.0254.71
4.4.30.0020.0204.76
4.4.20.0050.0174.84
4.4.10.0050.0174.85
4.4.00.0030.0294.76
4.3.110.0040.0144.67
4.3.100.0010.0164.66
4.3.90.0020.0154.64
4.3.80.0050.0264.59
4.3.70.0050.0124.63
4.3.60.0020.0184.62
4.3.50.0020.0194.63
4.3.40.0040.0294.54
4.3.30.0030.0163.30
4.3.20.0020.0163.28
4.3.10.0010.0183.23
4.3.00.0070.0177.13

preferences:
47.19 ms | 401 KiB | 5 Q