3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = array( "Sample" => array( "context" => 'جمهوری اسلامی ایران', "test" => '\u1234', ) ); $encoded = json_encode($json); var_dump($encoded); $unescaped = preg_replace_callback('/(?<!\\\\)\\\\u(\w{4})/', function ($matches) { return html_entity_decode('&#x' . $matches[1] . ';', ENT_COMPAT, 'UTF-8'); }, $encoded); var_dump($unescaped);

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.4.10.0040.00417.75
8.3.140.0060.00316.73
8.3.130.0030.00618.50
8.3.120.0080.00020.68
8.3.110.0090.00017.00
8.3.100.0030.00624.06
8.3.90.0040.00426.77
8.3.80.0060.00316.88
8.3.70.0090.00918.30
8.3.60.0030.01716.88
8.3.50.0110.00822.05
8.3.40.0090.00918.96
8.3.30.0070.00719.27
8.3.20.0040.00420.16
8.3.10.0040.00423.61
8.3.00.0040.00419.69
8.2.250.0060.00316.94
8.2.240.0060.00318.95
8.2.230.0040.00420.94
8.2.220.0030.00637.54
8.2.210.0120.00326.77
8.2.200.0060.00316.75
8.2.190.0070.00716.75
8.2.180.0100.01016.88
8.2.170.0080.00822.96
8.2.160.0070.00720.57
8.2.150.0090.00024.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0100.00019.37
8.2.110.0100.00022.25
8.2.100.0090.00318.03
8.2.90.0000.00822.31
8.2.80.0000.00817.97
8.2.70.0000.00817.93
8.2.60.0060.00318.09
8.2.50.0040.00418.10
8.2.40.0040.00420.10
8.2.30.0080.00318.16
8.2.20.0060.00318.05
8.2.10.0050.00318.23
8.2.00.0040.00418.03
8.1.300.0060.00318.33
8.1.290.0070.01018.88
8.1.280.0000.01525.92
8.1.270.0050.00323.99
8.1.260.0080.00026.35
8.1.250.0100.00728.09
8.1.240.0030.00622.54
8.1.230.0060.00620.97
8.1.220.0030.00517.80
8.1.210.0000.00819.04
8.1.200.0030.00617.48
8.1.190.0050.00317.52
8.1.180.0030.00718.10
8.1.170.0080.00018.59
8.1.160.0110.00018.89
8.1.150.0050.00318.81
8.1.140.0000.00817.54
8.1.130.0000.00717.67
8.1.120.0040.00717.64
8.1.110.0000.00717.52
8.1.100.0030.00617.64
8.1.90.0070.00017.60
8.1.80.0000.00717.69
8.1.70.0030.00317.46
8.1.60.0060.00317.59
8.1.50.0030.00617.61
8.1.40.0040.00417.67
8.1.30.0050.00317.81
8.1.20.0030.00517.69
8.1.10.0000.00717.72
8.1.00.0090.00317.70
8.0.300.0070.00019.89
8.0.290.0000.00816.88
8.0.280.0050.00218.39
8.0.270.0000.00716.98
8.0.260.0080.00016.96
8.0.250.0040.00417.13
8.0.240.0040.00417.14
8.0.230.0040.00416.98
8.0.220.0040.00417.07
8.0.210.0030.00517.06
8.0.200.0030.00316.95
8.0.190.0030.00517.09
8.0.180.0060.00317.01
8.0.170.0040.00417.10
8.0.160.0000.00917.12
8.0.150.0080.00017.05
8.0.140.0070.00416.90
8.0.130.0060.00013.38
8.0.120.0000.00817.02
8.0.110.0040.00417.03
8.0.100.0050.00317.01
8.0.90.0040.00417.11
8.0.80.0060.01216.98
8.0.70.0030.00517.02
8.0.60.0050.00217.02
8.0.50.0030.00517.08
8.0.30.0120.00917.04
8.0.20.0090.01017.40
8.0.10.0040.00417.04
8.0.00.0120.01317.17
7.4.330.0050.00015.12
7.4.320.0060.00016.87
7.4.300.0040.00416.84
7.4.290.0000.00716.71
7.4.280.0040.00416.82
7.4.270.0040.00416.71
7.4.260.0110.00016.57
7.4.250.0000.00716.70
7.4.240.0050.00216.77
7.4.230.0040.00416.81
7.4.220.0000.00716.81
7.4.210.0060.00916.75
7.4.200.0040.00416.86
7.4.160.0040.01116.70
7.4.150.0060.01217.40
7.4.140.0160.00317.86
7.4.130.0050.01416.65
7.4.120.0100.00716.68
7.4.110.0060.01216.73
7.4.100.0150.00416.48
7.4.90.0140.00316.79
7.4.80.0100.01019.39
7.4.70.0060.01116.57
7.4.60.0040.01116.82
7.4.50.0040.00416.73
7.4.40.0070.01016.75
7.4.30.0170.00316.77
7.4.00.0030.01114.92
7.3.330.0020.00213.29
7.3.320.0030.00313.26
7.3.310.0070.00016.36
7.3.300.0000.00716.32
7.3.290.0090.00716.41
7.3.280.0080.01216.34
7.3.270.0090.00917.40
7.3.260.0120.01216.34
7.3.250.0090.01116.64
7.3.240.0150.00616.46
7.3.230.0030.01716.60
7.3.210.0170.00016.67
7.3.200.0130.01019.39
7.3.190.0090.00916.61
7.3.180.0070.01116.64
7.3.170.0040.01316.44
7.3.160.0110.01116.59
7.3.120.0140.00014.86
7.2.330.0060.01116.84
7.2.320.0070.01016.65
7.2.310.0070.01016.63
7.2.300.0080.00816.84
7.2.290.0100.00716.64
7.2.70.0260.00714.99
7.2.60.0560.00716.15
7.2.50.0120.01515.30
7.2.40.0180.00915.20
7.2.30.0200.00614.93
7.2.20.0280.00615.05
7.2.10.0320.01117.24
7.2.00.0220.00717.75
7.1.200.0030.00815.95
7.1.170.0120.01214.20
7.1.160.0150.00914.00
7.1.150.0210.00413.95
7.1.140.0300.00614.21
7.1.130.0180.00914.12
7.1.120.0340.01015.52
7.1.110.0320.00515.25
7.1.100.0200.00716.11
7.1.90.0250.01115.01
7.1.80.0390.00315.42
7.1.70.0190.01015.74
7.1.60.0360.00627.60
7.1.50.0330.01527.56
7.1.40.0390.00827.16
7.1.30.0250.00927.33
7.1.20.0250.00927.21
7.1.10.0100.00915.34
7.1.00.0140.00815.31
7.0.300.0150.01113.70
7.0.290.0300.00313.82
7.0.270.0230.00713.43
7.0.260.0260.01115.11
7.0.250.0290.00914.69
7.0.240.0290.00814.95
7.0.230.0300.00914.93
7.0.220.0450.00814.61
7.0.210.0290.01014.26
7.0.200.0230.00915.11
7.0.190.0170.00615.16
7.0.180.0180.00514.91
7.0.170.0200.00714.81
7.0.160.0150.00714.93
7.0.150.0170.00914.76
7.0.140.0170.01014.88
7.0.130.0150.00714.96
7.0.120.0140.01015.01
7.0.110.0120.01014.97
7.0.100.0130.00814.98
7.0.90.0950.01114.98
7.0.80.0120.00814.98
7.0.70.0100.01114.92
7.0.60.0090.01114.85
7.0.50.0100.01115.00
7.0.40.0140.00714.49
7.0.30.0130.00714.67
7.0.20.0110.01014.65
7.0.10.0140.00614.59
7.0.00.0170.00614.57
5.6.300.0090.03318.69
5.6.290.0120.03218.59
5.6.280.0140.03618.77
5.6.270.0090.04518.68
5.6.260.0060.03918.70
5.6.250.0110.03418.72
5.6.240.0060.04018.80
5.6.230.0120.03418.68
5.6.220.0070.04118.70
5.6.210.0110.03418.62
5.6.200.0110.03618.75
5.6.190.0060.04418.57
5.6.180.0110.03418.69
5.6.170.0080.03618.62
5.6.160.0150.03218.83
5.6.150.0060.04018.73
5.6.140.0060.05118.66
5.6.130.0080.03518.76
5.6.120.0080.04018.56
5.6.110.0080.03418.73
5.6.100.0080.03618.64
5.6.90.0040.04118.67
5.6.80.0080.03218.33
5.6.70.0110.02918.35
5.6.60.0070.03618.28
5.6.50.0050.03518.16
5.6.40.0120.03318.25
5.6.30.0050.03618.24
5.6.20.0080.03518.20
5.6.10.0080.03118.25
5.6.00.0050.03618.22
5.5.380.0070.03515.46
5.5.370.0050.03715.42
5.5.360.0040.02415.59
5.5.350.0060.03815.40
5.5.340.0080.03515.78
5.5.330.0090.03215.74
5.5.320.0080.03315.83
5.5.310.0150.03115.81
5.5.300.0110.03815.65
5.5.290.0030.04115.66
5.5.280.0040.03615.88
5.5.270.0060.03715.73
5.5.260.0090.03415.83
5.5.250.0060.03815.65
5.5.240.0090.02915.36
5.5.230.0030.03915.39
5.5.220.0080.03815.24
5.5.210.0050.03515.33
5.5.200.0050.03915.28
5.5.190.0070.03215.29
5.5.180.0150.03015.07
5.5.160.0050.03215.30
5.5.150.0070.03315.35
5.5.140.0040.04515.36
5.5.130.0030.03515.38
5.5.120.0060.03315.37
5.5.110.0060.03215.23
5.5.100.0130.03115.05
5.5.90.0030.03715.25
5.5.80.0060.03015.25
5.5.70.0090.03215.34
5.5.60.0030.03515.14
5.5.50.0040.04015.16
5.5.40.0120.04415.23
5.5.30.0080.03415.10
5.5.20.0090.03415.30
5.5.10.0050.03815.10
5.5.00.0100.03315.07
5.4.450.0120.03316.66
5.4.440.0040.03716.60
5.4.430.0030.04416.66
5.4.420.0070.04216.63
5.4.410.0080.03116.62
5.4.400.0060.03316.55
5.4.390.0070.03516.28
5.4.380.0040.03716.25
5.4.370.0100.03116.43
5.4.360.0160.02716.27
5.4.350.0060.03616.37
5.4.340.0100.03116.36
5.4.320.0050.03516.37
5.4.310.0080.03116.43
5.4.300.0050.03516.35
5.4.290.0070.03216.32
5.4.280.0100.03916.24
5.4.270.0190.03216.32
5.4.260.0090.02916.41
5.4.250.0120.03216.33
5.4.240.0090.03016.35
5.4.230.0160.02816.43
5.4.220.0100.03216.32
5.4.210.0100.03716.28
5.4.200.0040.03916.43
5.4.190.0120.03716.49
5.4.180.0040.05116.35
5.4.170.0100.03216.33
5.4.160.0090.03516.29
5.4.150.0080.03716.51
5.4.140.0060.03714.77
5.4.130.0060.03214.76
5.4.120.0110.04114.60
5.4.110.0100.03614.79
5.4.100.0090.02714.73
5.4.90.0070.03114.82
5.4.80.0060.03114.79
5.4.70.0040.03514.74
5.4.60.0090.02814.84
5.4.50.0110.02514.82
5.4.40.0120.02414.72
5.4.30.0120.02614.86
5.4.20.0040.03214.85
5.4.10.0140.02914.78
5.4.00.0080.03614.46
5.3.290.0050.03713.57
5.3.280.0110.03213.47
5.3.270.0070.03513.45
5.3.260.0040.03513.60
5.3.250.0080.03113.51
5.3.240.0080.03613.51
5.3.230.0070.03213.50
5.3.220.0040.03513.55
5.3.210.0110.03113.48
5.3.200.0110.02813.42
5.3.190.0070.03113.47
5.3.180.0050.03313.61
5.3.170.0050.03213.59
5.3.160.0050.03413.59
5.3.150.0040.03413.50
5.3.140.0060.03513.54
5.3.130.0060.03413.49
5.3.120.0050.03513.44
5.3.110.0080.03613.37
5.3.100.0100.03413.31
5.3.90.0050.03113.32
5.3.80.0090.02813.28
5.3.70.0060.03013.30
5.3.60.0080.01713.23
5.3.50.0080.02813.34
5.3.40.0040.03313.31
5.3.30.0080.02913.31
5.3.20.0060.03313.16
5.3.10.0070.02713.05
5.3.00.0070.03213.17
5.2.170.0100.02311.94
5.2.160.0080.02211.95
5.2.150.0050.02411.92
5.2.140.0060.02511.91
5.2.130.0080.02111.84
5.2.120.0060.02611.83
5.2.110.0090.02011.86
5.2.100.0020.02711.80
5.2.90.0040.02411.93
5.2.80.0040.02611.79
5.2.70.0050.02511.85
5.2.60.0070.02411.77
5.2.50.0030.02811.89
5.2.40.0120.02111.84
5.2.30.0100.02611.79
5.2.20.0080.02011.71
5.2.10.0050.02611.68
5.2.00.0050.02811.66
5.1.60.0080.02111.40
5.1.50.0080.01711.38
5.1.40.0070.01711.34
5.1.30.0030.02311.51
5.1.20.0060.02011.51
5.1.10.0020.02311.41
5.1.00.0060.02011.37
5.0.50.0050.01711.10
5.0.40.0060.01411.10
5.0.30.0040.02511.10
5.0.20.0040.01811.10
5.0.10.0050.01611.10
5.0.00.0040.02511.10
4.4.90.0040.01111.10
4.4.80.0040.01511.10
4.4.70.0060.01211.10
4.4.60.0020.01411.10
4.4.50.0030.01411.10
4.4.40.0030.02011.10
4.4.30.0040.01411.10
4.4.20.0030.01311.10
4.4.10.0010.01711.10
4.4.00.0020.02111.10
4.3.110.0050.01311.10
4.3.100.0050.01111.10
4.3.90.0030.01211.10
4.3.80.0030.01911.10
4.3.70.0030.01211.10
4.3.60.0040.01111.10
4.3.50.0050.01211.10
4.3.40.0040.02311.10
4.3.30.0020.01611.10
4.3.20.0050.01211.10
4.3.10.0030.01411.10
4.3.00.0030.01311.10

preferences:
55.18 ms | 403 KiB | 5 Q