3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hexColor = 'f12'; $color = implode('', array_map(function($color){ return str_repeat($color, 2); }, str_split($hexColor))); echo $color; echo PHP_EOL; print_r( array( 'R' => hexdec($color[0] . $color[1]), 'G' => hexdec($color[2] . $color[3]), 'B' => hexdec($color[4] . $color[5]), ) ); $test = sscanf($color, '%02x%02x%02x', $RGB['R'], $RGB['G'], $RGB['B']); var_dump($test); print_r( $RGB ); echo PHP_EOL;

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.70.0130.01016.50
8.3.60.0140.00718.25
8.3.50.0070.01122.05
8.3.40.0040.01118.96
8.3.30.0090.00618.99
8.3.20.0020.00520.08
8.3.10.0080.00021.86
8.3.00.0030.00619.05
8.2.190.0110.00416.58
8.2.180.0130.00718.25
8.2.170.0130.00622.96
8.2.160.0040.01122.30
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0030.00626.16
8.2.120.0110.00018.15
8.2.110.0040.00422.43
8.2.100.0090.00319.71
8.2.90.0050.00319.17
8.2.80.0060.00317.97
8.2.70.0040.00417.49
8.2.60.0040.00418.16
8.2.50.0100.00018.07
8.2.40.0030.00618.16
8.2.30.0040.00418.02
8.2.20.0020.00517.73
8.2.10.0050.00318.10
8.2.00.0000.00817.64
8.1.280.0040.01225.92
8.1.270.0060.00318.87
8.1.260.0070.00726.35
8.1.250.0080.00028.09
8.1.240.0060.00323.81
8.1.230.0040.00719.01
8.1.220.0050.00317.79
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0030.00618.10
8.1.170.0000.00818.59
8.1.160.0020.00521.92
8.1.150.0000.00718.79
8.1.140.0000.00819.15
8.1.130.0040.00417.82
8.1.120.0040.00417.44
8.1.110.0080.00017.39
8.1.100.0030.00517.44
8.1.90.0050.00217.44
8.1.80.0040.00417.41
8.1.70.0070.00017.46
8.1.60.0000.00817.62
8.1.50.0040.00417.55
8.1.40.0040.00417.51
8.1.30.0080.00017.65
8.1.20.0080.00017.63
8.1.10.0040.00417.52
8.1.00.0000.00817.51
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0030.00318.44
8.0.270.0040.00417.24
8.0.260.0030.00317.09
8.0.250.0000.00716.97
8.0.240.0000.00716.92
8.0.230.0000.00716.93
8.0.220.0070.00016.89
8.0.210.0030.00316.77
8.0.200.0030.00316.96
8.0.190.0040.00416.82
8.0.180.0000.00716.92
8.0.170.0040.00416.78
8.0.160.0000.00716.82
8.0.150.0050.00216.83
8.0.140.0000.00716.88
8.0.130.0030.00313.34
8.0.120.0040.00416.73
8.0.110.0040.00416.95
8.0.100.0040.00416.80
8.0.90.0000.00816.88
8.0.80.0060.01616.93
8.0.70.0000.00816.69
8.0.60.0040.00416.70
8.0.50.0000.00716.99
8.0.30.0120.01117.22
8.0.20.0100.00817.40
8.0.10.0050.00316.90
8.0.00.0110.00616.82
7.4.330.0000.00615.03
7.4.320.0060.00016.59
7.4.300.0040.00416.51
7.4.290.0000.00716.51
7.4.280.0030.00516.47
7.4.270.0070.00016.35
7.4.260.0030.00316.50
7.4.250.0080.00016.60
7.4.240.0030.00316.57
7.4.230.0040.00416.40
7.4.220.0120.00616.55
7.4.210.0060.00916.66
7.4.200.0050.00316.38
7.4.160.0120.00416.53
7.4.150.0130.00517.40
7.4.140.0100.01117.86
7.4.130.0110.00916.40
7.4.120.0100.01316.50
7.4.110.0120.00416.55
7.4.100.0130.00316.66
7.4.90.0030.01516.57
7.4.80.0110.00719.39
7.4.70.0110.00716.68
7.4.60.0120.00616.38
7.4.50.0030.00616.36
7.4.40.0030.01416.45
7.4.30.0110.00716.70
7.4.00.0080.00814.94
7.3.330.0000.00513.31
7.3.320.0020.00213.36
7.3.310.0030.00316.32
7.3.300.0000.00616.23
7.3.290.0070.00716.34
7.3.280.0090.00816.36
7.3.270.0100.00717.40
7.3.260.0100.00616.41
7.3.250.0110.01016.47
7.3.240.0100.00716.39
7.3.230.0090.01216.55
7.3.210.0000.01616.68
7.3.200.0050.00719.39
7.3.190.0130.01316.42
7.3.180.0140.00316.43
7.3.170.0060.01316.42
7.3.160.0070.01116.55
7.3.120.0090.00915.13
7.3.110.0030.01415.15
7.3.100.0090.00614.82
7.3.90.0030.01314.86
7.3.80.0070.00715.09
7.3.70.0080.00414.76
7.3.60.0090.00614.60
7.3.50.0060.00914.94
7.3.40.0000.01214.84
7.3.30.0100.00314.60
7.3.20.0060.00916.75
7.3.10.0090.00616.70
7.3.00.0040.00416.47
7.2.330.0110.00716.74
7.2.320.0090.00916.74
7.2.310.0070.01116.54
7.2.300.0100.00716.51
7.2.290.0100.01316.48
7.2.250.0100.00615.07
7.2.240.0070.01414.86
7.2.230.0090.00615.24
7.2.220.0110.00814.88
7.2.210.0100.00315.14
7.2.200.0060.00915.10
7.2.190.0030.00614.90
7.2.180.0000.01015.02
7.2.170.0070.01015.21
7.2.60.0030.01017.05
7.2.00.0110.00419.66
7.1.330.0080.00515.69
7.1.320.0110.00715.58
7.1.310.0000.01315.93
7.1.300.0040.00715.55
7.1.290.0110.00015.75
7.1.280.0030.01215.95
7.1.270.0040.00415.99
7.1.260.0000.01415.71
7.1.200.0040.00415.71
7.1.100.0880.00312.25
7.1.70.0050.00517.13
7.1.60.0150.01119.46
7.1.50.0070.01416.86
7.1.00.0100.06722.51
7.0.200.0040.00416.96
7.0.140.0030.03322.18
7.0.60.0100.06319.83
7.0.50.0000.04317.79
7.0.40.0130.04720.15
7.0.30.0300.03720.26
7.0.20.0200.08320.05
7.0.10.0130.07020.17
7.0.00.0070.07720.05
5.6.280.0130.06320.89
5.6.210.0070.05720.71
5.6.200.0130.03018.20
5.6.190.0030.04320.64
5.6.180.0570.06020.42
5.6.170.0130.04320.48
5.6.160.0070.05320.54
5.6.150.0100.08018.20
5.6.140.0000.05318.18
5.6.130.0100.08318.18
5.6.120.0030.08321.14
5.6.110.0100.09020.98
5.6.100.0030.04021.04
5.6.90.0130.06320.98
5.6.80.0070.04020.51
5.5.350.4330.03320.31
5.5.340.0070.05317.99
5.5.330.0070.08020.55
5.5.320.2530.04720.19
5.5.310.0400.07320.30
5.5.300.0070.06017.96
5.5.290.0030.08718.06
5.5.280.0070.08320.74
5.5.270.0000.04720.73
5.5.260.0030.04320.65
5.5.250.0070.05020.71
5.5.240.0100.07320.05
5.4.450.0670.06019.62
5.4.440.0500.05719.43
5.4.430.0130.05019.21
5.4.420.0170.05019.68
5.4.410.0100.05319.27
5.4.400.0200.04319.25
5.4.390.0200.07018.75
5.4.380.0230.05318.79
5.4.370.0270.04318.56
5.4.360.0130.06318.61
5.4.350.0300.06318.50
5.4.340.0300.06318.62
5.4.320.0230.05018.83
5.4.310.0230.04718.47
5.4.300.0170.05018.69
5.4.290.0270.04718.53
5.4.280.0230.04718.78
5.4.270.0270.07018.74
5.4.260.0170.06018.58
5.4.250.0230.05018.76
5.4.240.0300.04718.54
5.4.230.0200.06018.71
5.4.220.0130.05718.60
5.4.210.0370.04318.68
5.4.200.0170.05316.80
5.4.190.0270.04718.49
5.4.180.0100.06318.55
5.4.170.0030.07018.71
5.4.160.0200.05718.59
5.4.150.0300.07018.82
5.4.140.0170.05316.45
5.4.130.0130.05316.18
5.4.120.0130.05716.33
5.4.110.0200.05316.38
5.4.100.0200.05016.33
5.4.90.0230.05316.29
5.4.80.0270.04016.25
5.4.70.0400.02716.30
5.4.60.0200.05016.15
5.4.50.0170.05316.31
5.4.40.0270.04016.27
5.4.30.0230.06016.23
5.4.20.0170.06016.29
5.4.10.0170.05016.26
5.4.00.0130.05315.79
5.3.290.0300.04714.77
5.3.280.0230.04714.63
5.3.270.0230.05314.63
5.3.260.0200.05714.73
5.3.250.0270.04314.64
5.3.240.0230.06714.65
5.3.230.0200.05014.70
5.3.220.0230.04714.62
5.3.210.0100.06314.79
5.3.200.0170.05314.69
5.3.190.0270.04314.70
5.3.180.0200.05014.67
5.3.170.0200.05014.54
5.3.160.0230.06714.80
5.3.150.0230.07014.67
5.3.140.0130.07714.73
5.3.130.0370.05714.73
5.3.120.0230.05314.71
5.3.110.0170.06714.73
5.3.100.0200.07314.25
5.3.90.0100.08314.07
5.3.80.0230.04714.23
5.3.70.0170.06014.02
5.3.60.0170.06014.00
5.3.50.0200.05313.99
5.3.40.0200.04714.00
5.3.30.0170.04714.13
5.3.20.0300.04013.86
5.3.10.0200.04313.68
5.3.00.0130.05313.77
5.2.170.0130.04711.11
5.2.160.0100.04311.11
5.2.150.0130.04311.07
5.2.140.0070.05011.19
5.2.130.0100.04711.13
5.2.120.0170.03711.23
5.2.110.0170.03711.27
5.2.100.0100.04311.14
5.2.90.0100.04311.06
5.2.80.0100.04711.15
5.2.70.0170.04011.01
5.2.60.0170.03711.07
5.2.50.0100.04710.93
5.2.40.0170.03311.13
5.2.30.0100.04311.00
5.2.20.0130.04010.96
5.2.10.0130.03710.88
5.2.00.0100.04010.73
5.1.60.0100.03710.02
5.1.50.0100.03310.06
5.1.40.0070.0409.95
5.1.30.0170.03710.40
5.1.20.0100.04010.38
5.1.10.0100.03310.05
5.1.00.0200.03010.20
5.0.50.0070.0308.64
5.0.40.0130.0378.43
5.0.30.0070.0438.27
5.0.20.0030.0308.28
5.0.10.0070.0378.19
5.0.00.0030.0508.19
4.4.90.0030.0235.88
4.4.80.0070.0275.91
4.4.70.0070.0235.86
4.4.60.0100.0205.81
4.4.50.0030.0275.91
4.4.40.0000.0405.87
4.4.30.0100.0205.82
4.4.20.0030.0235.95
4.4.10.0130.0205.95
4.4.00.0070.0405.94
4.3.110.0130.0175.86
4.3.100.0070.0205.83
4.3.90.0130.0205.76
4.3.80.0070.0335.77
4.3.70.0130.0175.77
4.3.60.0070.0205.77
4.3.50.0100.0205.81
4.3.40.0100.0305.75
4.3.30.0000.0274.55
4.3.20.0000.0274.62
4.3.10.0070.0204.49
4.3.00.0070.0238.78

preferences:
42.74 ms | 401 KiB | 5 Q