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, $bad_char) !== 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.0080.01222.82
8.3.40.0110.00718.97
8.3.30.0040.01119.12
8.3.20.0050.00320.34
8.3.10.0070.00023.53
8.3.00.0000.00819.26
8.2.180.0070.01316.88
8.2.170.0060.00922.96
8.2.160.0150.00320.39
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00020.70
8.2.110.0040.00422.07
8.2.100.0100.00317.97
8.2.90.0000.00819.39
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0000.00817.93
8.2.50.0090.00018.07
8.2.40.0040.00418.22
8.2.30.0000.00718.01
8.2.20.0030.00517.81
8.2.10.0050.00218.09
8.2.00.0000.00717.85
8.1.280.0040.01125.92
8.1.270.0060.00323.99
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0060.00323.74
8.1.230.0060.00619.09
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0080.00317.23
8.1.190.0000.00817.10
8.1.180.0000.00918.10
8.1.170.0030.00618.59
8.1.160.0000.00722.01
8.1.150.0070.00018.91
8.1.140.0040.00417.46
8.1.130.0030.00317.74
8.1.120.0040.00417.52
8.1.110.0040.00417.45
8.1.100.0000.00817.49
8.1.90.0070.00017.46
8.1.80.0040.00417.36
8.1.70.0000.00717.42
8.1.60.0030.00617.48
8.1.50.0050.00317.37
8.1.40.0000.00817.50
8.1.30.0000.00817.64
8.1.20.0020.00517.50
8.1.10.0000.00717.54
8.1.00.0040.00417.53
8.0.300.0040.00418.77
8.0.290.0000.00716.72
8.0.280.0050.00218.45
8.0.270.0040.00417.26
8.0.260.0000.00617.21
8.0.250.0030.00317.04
8.0.240.0030.00316.89
8.0.230.0000.00617.02
8.0.220.0030.00416.95
8.0.210.0050.00316.98
8.0.200.0030.00317.02
8.0.190.0030.00517.00
8.0.180.0070.00016.95
8.0.170.0000.00817.05
8.0.160.0000.00716.99
8.0.150.0060.00316.87
8.0.140.0000.00716.88
8.0.130.0080.00013.35
8.0.120.0080.00016.91
8.0.110.0040.00417.00
8.0.100.0070.00016.95
8.0.90.0080.00016.91
8.0.80.0160.00616.86
8.0.70.0080.00017.00
8.0.60.0020.00516.95
8.0.50.0040.00416.89
8.0.30.0060.01317.08
8.0.20.0090.01017.40
8.0.10.0040.00417.02
8.0.00.0070.01216.67
7.4.330.0000.00515.03
7.4.320.0070.00016.56
7.4.300.0000.00616.57
7.4.290.0030.00316.48
7.4.280.0080.00016.50
7.4.270.0000.00716.43
7.4.260.0070.00016.61
7.4.250.0030.00616.46
7.4.240.0040.00316.54
7.4.230.0050.00216.41
7.4.220.0120.00616.68
7.4.210.0090.00616.48
7.4.200.0070.00016.50
7.4.160.0120.00316.32
7.4.150.0110.00717.40
7.4.140.0100.00917.86
7.4.130.0120.00816.59
7.4.120.0100.00816.60
7.4.110.0120.01216.66
7.4.100.0070.01016.66
7.4.90.0130.01016.71
7.4.80.0140.00319.39
7.4.70.0100.00716.63
7.4.60.0060.01016.42
7.4.50.0090.00016.66
7.4.40.0060.01216.36
7.4.30.0000.01516.74
7.4.00.0070.01014.85
7.3.330.0040.00313.26
7.3.320.0030.00313.46
7.3.310.0000.00716.32
7.3.300.0000.00716.38
7.3.290.0080.00516.48
7.3.280.0060.01216.45
7.3.270.0090.00917.40
7.3.260.0030.01416.45
7.3.250.0100.00616.66
7.3.240.0120.00916.44
7.3.230.0120.00616.39
7.3.210.0100.00616.39
7.3.200.0080.00819.39
7.3.190.0030.01416.68
7.3.180.0090.00616.39
7.3.170.0070.01016.48
7.3.160.0110.00416.53
7.2.330.0180.01616.79
7.2.320.0070.01516.58
7.2.310.0110.00916.79
7.2.300.0070.01416.57
7.2.290.0130.00316.58
7.2.00.0000.01419.09
7.1.100.0040.00818.35
7.1.70.0040.01117.26
7.1.60.0140.01119.40
7.1.50.0070.01316.97
7.1.00.0030.07722.40
7.0.200.0240.00314.94
7.0.140.0070.06721.99
7.0.60.0200.07319.91
7.0.50.0070.04017.84
7.0.40.0030.04720.22
7.0.30.0330.07320.15
7.0.20.0230.06720.09
7.0.10.0030.05320.22
7.0.00.0100.08020.24
5.6.280.0030.07320.86
5.6.210.0230.07020.50
5.6.200.0170.07018.29
5.6.190.0170.07320.28
5.6.180.0500.07020.52
5.6.170.0330.08020.41
5.6.160.0070.04020.59
5.6.150.0130.03018.23
5.6.140.0100.06718.18
5.6.130.0030.08018.18
5.6.120.0070.03721.00
5.6.110.0070.08321.13
5.6.100.0070.08720.98
5.6.90.0030.07721.01
5.6.80.0100.03720.38
5.5.350.0230.03720.30
5.5.340.0070.08018.09
5.5.330.0030.08720.32
5.5.320.2430.04320.27
5.5.310.0270.05020.41
5.5.300.0070.07318.07
5.5.290.0030.04317.95
5.5.280.0200.07020.88
5.5.270.0000.04320.63
5.5.260.0170.07720.61
5.5.250.0130.06020.61
5.5.240.0230.07020.15
5.4.450.0200.04719.48
5.4.440.0800.05319.55
5.4.430.0170.05019.63
5.4.420.0070.06019.54
5.4.410.0170.04718.92
5.4.400.0170.04718.84
5.4.390.0070.05318.84
5.4.380.0170.04718.61
5.4.370.0170.04018.50
5.4.360.0030.04018.68
5.4.350.0070.03912.02
5.4.340.0150.04012.01
5.4.320.0070.03612.50
5.4.310.0070.03812.50
5.4.300.0040.03912.50
5.4.290.0060.03912.49
5.4.280.0110.04412.39
5.4.270.0100.03612.39
5.4.260.0060.03712.39
5.4.250.0090.03512.39
5.4.240.0060.04012.39
5.4.230.0100.03512.38
5.4.220.0060.03612.38
5.4.210.0050.03812.38
5.4.200.0070.03712.39
5.4.190.0050.03612.38
5.4.180.0040.03812.38
5.4.170.0100.03512.39
5.4.160.0050.03912.38
5.4.150.0050.04012.38
5.4.140.0040.03912.07
5.4.130.0050.03812.06
5.4.120.0080.04212.01
5.4.110.0040.04412.01
5.4.100.0080.04112.00
5.4.90.0060.04412.01
5.4.80.0070.04712.01
5.4.70.0140.04112.00
5.4.60.0120.04412.01
5.4.50.0070.05312.01
5.4.40.0130.04212.00
5.4.30.0080.04811.99
5.4.20.0060.03711.99
5.4.10.0080.04211.99
5.4.00.0100.04811.48
5.3.290.0090.05212.80
5.3.280.0090.04512.71
5.3.270.0070.04012.72
5.3.260.0060.04312.71
5.3.250.0140.04712.72
5.3.240.0050.04312.71
5.3.230.0060.05112.71
5.3.220.0150.05112.68
5.3.210.0070.05512.68
5.3.200.0100.04312.68
5.3.190.0120.04712.68
5.3.180.0080.05212.67
5.3.170.0110.05212.67
5.3.160.0060.04512.68
5.3.150.0060.04312.68
5.3.140.0120.04112.66
5.3.130.0020.04512.66
5.3.120.0040.04112.65
5.3.110.0060.04112.66
5.3.100.0060.04112.12
5.3.90.0090.04412.09
5.3.80.0060.04112.10
5.3.70.0050.03912.08
5.3.60.0070.04212.07
5.3.50.0060.03812.02
5.3.40.0060.04012.02
5.3.30.0090.04211.97
5.3.20.0090.04811.76
5.3.10.0080.04411.72
5.3.00.0020.04311.71
5.2.170.0070.0309.21
5.2.160.0070.0349.21
5.2.150.0070.0379.21
5.2.140.0060.0369.20
5.2.130.0050.0319.17
5.2.120.0020.0319.17
5.2.110.0070.0299.18
5.2.100.0080.0339.17
5.2.90.0060.0319.17
5.2.80.0060.0329.17
5.2.70.0060.0349.16
5.2.60.0080.0309.12
5.2.50.0060.0329.09
5.2.40.0060.0309.06
5.2.30.0020.0379.04
5.2.20.0070.0339.04
5.2.10.0080.0288.94
5.2.00.0090.0278.80
5.1.60.0030.0278.08
5.1.50.0050.0278.08
5.1.40.0050.0248.06
5.1.30.0050.0288.41
5.1.20.0040.0288.43
5.1.10.0030.0288.15
5.1.00.0040.0288.15
5.0.50.0040.0226.64
5.0.40.0040.0226.50
5.0.30.0020.0396.32
5.0.20.0030.0256.29
5.0.10.0020.0266.26
5.0.00.0040.0366.25
4.4.90.0030.0194.78
4.4.80.0020.0174.75
4.4.70.0020.0214.76
4.4.60.0020.0174.76
4.4.50.0030.0204.77
4.4.40.0020.0294.71
4.4.30.0050.0144.76
4.4.20.0050.0184.84
4.4.10.0080.0104.85
4.4.00.0020.0264.76
4.3.110.0010.0174.67
4.3.100.0040.0194.66
4.3.90.0030.0164.63
4.3.80.0040.0244.58
4.3.70.0000.0194.63
4.3.60.0060.0114.63
4.3.50.0040.0164.62
4.3.40.0050.0224.54
4.3.30.0030.0153.30
4.3.20.0020.0193.28
4.3.10.0010.0163.24
4.3.00.0000.0236.83

preferences:
38.63 ms | 401 KiB | 5 Q