3v4l.org

run code in 500+ PHP versions simultaneously
<?php $number = 0x12A; $string = '0x12A'; // direct decoding echo hexdec($string); // the reverse way $newString = '0x'.dechex($number); ?>

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.5.60.0100.00816.79
8.5.50.0110.00616.48
8.5.30.0090.00819.65
8.5.20.0110.00820.24
8.5.10.0100.00816.77
8.5.00.0140.00819.81
8.4.210.0040.00521.27
8.4.180.0120.01019.64
8.4.170.0120.00923.81
8.4.160.0110.01023.75
8.4.150.0070.00516.85
8.4.140.0110.01117.42
8.4.130.0130.00819.56
8.4.120.0110.00920.29
8.4.110.0100.01122.68
8.4.100.0130.00817.59
8.4.90.0050.00418.64
8.4.80.0140.00520.57
8.4.70.0120.00618.76
8.4.60.0110.00918.75
8.4.50.0060.00318.54
8.4.40.0030.00717.64
8.4.30.0430.00517.19
8.4.20.0500.00317.45
8.4.10.0410.00617.22
8.3.300.0130.00720.83
8.3.290.0170.00518.29
8.3.280.0110.00918.39
8.3.270.0140.00616.71
8.3.260.0050.00316.42
8.3.250.0100.00818.98
8.3.240.0110.00716.80
8.3.230.0090.00916.48
8.3.220.0100.00818.74
8.3.210.0100.00416.73
8.3.200.0050.00316.16
8.3.190.0030.00517.07
8.3.180.0110.00618.97
8.3.170.0110.00717.05
8.3.160.0350.01016.34
8.3.150.0340.01116.24
8.3.140.0340.00616.57
8.3.130.0170.00216.36
8.3.120.0220.00316.07
8.3.110.0330.00716.29
8.3.100.0360.00716.40
8.3.90.0350.01016.13
8.3.80.0370.01716.26
8.3.70.0390.00616.43
8.3.60.0370.00816.16
8.3.50.0410.00016.10
8.3.40.0390.00317.26
8.3.30.0300.00617.26
8.3.20.0230.01317.02
8.3.10.0330.00317.41
8.3.00.0180.00817.22
8.2.300.0120.00817.98
8.2.290.0070.01120.21
8.2.280.0110.00820.11
8.2.270.0160.02016.70
8.2.260.0340.00616.34
8.2.250.0290.00816.32
8.2.240.0380.00016.44
8.2.230.0210.01716.17
8.2.220.0270.01216.29
8.2.210.0270.01216.14
8.2.200.0320.00616.41
8.2.190.0350.00816.27
8.2.180.0390.00616.25
8.2.170.0320.00917.60
8.2.160.0300.01017.57
8.2.150.0340.00717.47
8.2.140.0320.00817.19
8.2.130.0290.01117.32
8.2.120.0360.01117.29
8.2.110.0240.01017.58
8.2.100.0320.00317.43
8.2.90.0290.01017.59
8.2.80.0330.00617.46
8.2.70.0310.00917.51
8.2.60.0380.00617.39
8.2.50.0280.01017.41
8.2.40.0290.00717.61
8.2.30.0310.00617.46
8.2.20.0330.00417.36
8.2.10.0270.00917.28
8.2.00.0330.00417.19
8.1.340.0120.00917.55
8.1.320.0090.01018.05

preferences:
35.87 ms | 847 KiB | 5 Q