3v4l.org

run code in 300+ PHP versions simultaneously
<?php print json_encode(null, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "\n"; print json_encode(false, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "\n"; print json_encode(0, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "\n"; print json_encode('text', JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "\n"; print json_encode(['text'], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "\n"; print json_encode(['key' => 'value'], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "\n"; print json_encode(new class{public $key = 'value';}, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "\n";

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.0100.00316.63
8.3.50.0040.01118.05
8.3.40.0040.01118.61
8.3.30.0070.00718.33
8.3.20.0040.00420.34
8.3.10.0050.00322.10
8.3.00.0030.00623.47
8.2.180.0090.00916.63
8.2.170.0100.00322.96
8.2.160.0100.00720.35
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0040.00422.21
8.2.120.0060.00326.35
8.2.110.0040.00421.18
8.2.100.0090.00317.91
8.2.90.0030.00619.09
8.2.80.0050.00317.97
8.2.70.0000.00917.38
8.2.60.0000.00917.91
8.2.50.0030.00518.10
8.2.40.0050.00322.16
8.2.30.0040.00419.30
8.2.20.0040.00417.97
8.2.10.0020.00517.98
8.2.00.0000.00717.88
8.1.280.0190.01125.92
8.1.270.0030.00620.41
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00321.22
8.1.230.0080.00417.64
8.1.220.0080.00017.77
8.1.210.0030.00518.77
8.1.200.0090.00017.25
8.1.190.0060.00317.35
8.1.180.0080.00018.10
8.1.170.0000.00818.59
8.1.160.0040.00418.72
8.1.150.0000.00720.06
8.1.140.0000.00717.52
8.1.130.0000.00718.94
8.1.120.0040.00417.39
8.1.110.0000.00817.36
8.1.100.0000.00817.30
8.1.90.0020.00517.41
8.1.80.0040.00417.45
8.1.70.0000.00717.43
8.1.60.0030.00617.53
8.1.50.0080.00017.34
8.1.40.0000.00717.41
8.1.30.0030.00517.57
8.1.20.0040.00417.50
8.1.10.0040.00417.42
8.1.00.0030.00617.47
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00718.45
8.0.270.0000.00717.17
8.0.260.0070.00018.34
8.0.250.0070.00016.88
8.0.240.0070.00016.93
8.0.230.0040.00416.72
8.0.220.0050.00216.75
8.0.210.0040.00416.72
8.0.200.0000.00816.77
8.0.190.0040.00416.86
8.0.180.0050.00216.80
8.0.170.0000.00716.86
8.0.160.0070.00316.82
8.0.150.0070.00316.72
8.0.140.0070.00016.72
8.0.130.0000.00513.21
8.0.120.0040.00416.82
8.0.110.0050.00316.74
8.0.100.0000.00816.86
8.0.90.0000.00916.82
8.0.80.0030.01216.77
8.0.70.0080.00016.89
8.0.60.0040.00416.70
8.0.50.0000.00716.88
8.0.30.0100.00817.13
8.0.20.0080.01117.40
8.0.10.0000.00716.83
8.0.00.0100.01316.54
7.4.330.0060.00015.55
7.4.320.0030.00316.46
7.4.300.0000.00616.43
7.4.290.0080.00016.48
7.4.280.0000.00716.57
7.4.270.0030.00316.45
7.4.260.0030.00316.55
7.4.250.0000.00716.35
7.4.240.0060.00216.43
7.4.230.0030.00316.24
7.4.220.0190.00316.50
7.4.210.0030.01016.53
7.4.200.0030.00616.35
7.4.160.0090.00916.46
7.4.150.0090.00917.40
7.4.140.0110.00917.86
7.4.130.0210.00316.36
7.4.120.0110.00816.44
7.4.110.0070.01316.36
7.4.100.0140.00316.32
7.4.90.0140.00316.28
7.4.80.0170.00919.39
7.4.70.0100.01316.55
7.4.60.0100.00616.55
7.4.50.0120.00616.40
7.4.40.0100.00716.33
7.4.30.0030.01316.55
7.4.10.0100.01014.97
7.4.00.0050.01314.88
7.3.330.0050.00013.01
7.3.320.0000.00513.16
7.3.310.0070.00016.22
7.3.300.0000.00616.24
7.3.290.0030.01316.19
7.3.280.0080.01016.23
7.3.270.0090.00917.40
7.3.260.0160.00716.34
7.3.250.0110.00816.37
7.3.240.0110.00816.24
7.3.230.0120.00916.55
7.3.210.0060.01016.49
7.3.200.0090.00916.20
7.3.190.0090.00616.45
7.3.180.0030.01416.43
7.3.170.0060.00916.35
7.3.160.0090.00616.41
7.3.130.0060.00614.81
7.3.120.0090.00614.69
7.3.110.0070.01114.73
7.3.100.0070.00714.46
7.3.90.0080.00414.73
7.3.80.0060.00614.68
7.3.70.0070.00414.63
7.3.60.0040.00814.60
7.3.50.0090.00314.77
7.3.40.0070.00414.81
7.3.30.0030.00614.52
7.3.20.0000.01316.51
7.3.10.0040.00816.64
7.3.00.0060.00316.40
7.2.330.0100.01016.43
7.2.320.0100.01316.38
7.2.310.0120.00916.57
7.2.300.0080.00916.31
7.2.290.0080.00816.32
7.2.260.0130.00714.92
7.2.250.0040.01114.70
7.2.240.0110.00715.15
7.2.230.0000.01115.09
7.2.220.0030.01215.07
7.2.210.0030.01014.88
7.2.200.0000.01114.72
7.2.190.0030.01014.96
7.2.180.0000.00914.80
7.2.170.0060.00614.98
7.2.160.0030.00914.94
7.2.150.0040.01116.62
7.2.140.0130.00016.57
7.2.130.0060.00916.66
7.2.120.0040.00416.88
7.2.110.0060.00616.66
7.2.100.0070.01016.93
7.2.90.0040.01117.06
7.2.80.0020.01116.68
7.2.70.0100.00317.08
7.2.60.0030.01216.83
7.2.50.0030.00916.82
7.2.40.0090.00616.73
7.2.30.0070.01016.99
7.2.20.0090.00616.75
7.2.10.0000.01516.85
7.2.00.0000.01317.05
7.1.330.0060.00615.50
7.1.320.0070.00715.70
7.1.310.0000.01515.81
7.1.300.0070.00715.36
7.1.290.0000.01015.76
7.1.280.0030.01015.68
7.1.270.0040.00815.65
7.1.260.0070.00315.78
7.1.250.0030.00715.73
7.1.240.0000.01215.51
7.1.230.0080.00615.76
7.1.220.0030.01015.63
7.1.210.0090.00615.53
7.1.200.0030.01015.60
7.1.190.0040.01115.64
7.1.180.0060.00615.62
7.1.170.0070.01015.58
7.1.160.0060.00915.65
7.1.150.0040.00715.69
7.1.140.0060.00315.59
7.1.130.0060.00615.48
7.1.120.0080.00315.73
7.1.110.0070.00715.59
7.1.100.0120.00715.93
7.1.90.0160.00615.95
7.1.80.0300.00815.99
7.1.70.0120.00715.38
7.1.60.0190.01124.53
7.1.50.2030.00924.32
7.1.40.0170.00924.10
7.1.30.0160.01123.96
7.1.20.7560.00924.00
7.1.10.9330.01115.25
7.1.00.4350.01115.11
7.0.330.0030.01014.98
7.0.320.0070.00715.22
7.0.310.0090.00315.33
7.0.300.0000.01315.31
7.0.290.0030.01315.32
7.0.280.0060.00615.28
7.0.270.0070.00715.38
7.0.260.0080.00415.15
7.0.250.0140.00015.53
7.0.240.0080.01315.55
7.0.230.0210.01015.50
7.0.220.0710.01215.61
7.0.210.0050.00915.03
7.0.200.0090.00815.10
7.0.190.3590.01414.98
7.0.180.2040.00914.79
7.0.170.5020.01114.82
7.0.161.3080.00611.07
7.0.150.6970.00414.80
7.0.140.4490.00815.09
7.0.130.5540.01015.03
7.0.120.5050.01215.08
7.0.110.5240.01214.67
7.0.100.4640.01315.08
7.0.90.4380.01014.87
7.0.80.4370.01314.87
7.0.70.3600.00814.81
7.0.60.3420.00714.70
7.0.50.3090.01514.82
7.0.40.3010.01414.05
7.0.30.3100.00813.88
7.0.20.3440.00513.90
7.0.10.3030.00913.98
7.0.00.2530.01113.95
5.6.400.0060.00613.85
5.6.390.0030.00514.25
5.6.380.0120.00313.88
5.6.370.0030.01014.27
5.6.360.0000.01414.06
5.6.350.0000.00914.02
5.6.340.0000.01113.92
5.6.330.0080.00413.98
5.6.320.0030.00914.11
5.6.310.0030.01014.38
5.6.300.0100.00714.43
5.6.290.0000.01014.24
5.6.280.0090.00314.02
5.6.270.0040.00713.99
5.6.260.0050.00514.10
5.6.250.0110.00414.18
5.6.240.0060.00614.16
5.6.230.0040.00714.05
5.6.220.0030.00714.02
5.6.210.0070.01013.88
5.6.200.0000.01814.08
5.6.190.0040.01114.23
5.6.180.0080.00814.02
5.6.170.0100.00713.90
5.6.160.0000.01713.91
5.6.150.0070.01013.77
5.6.140.0070.00714.07
5.6.130.0090.00014.19
5.6.120.0090.00614.33
5.6.110.0120.00314.02
5.6.100.0090.00613.98
5.6.90.0050.00513.93
5.6.80.0060.00914.03
5.6.70.0040.00714.19
5.6.60.0090.00613.93
5.6.50.0070.00714.18
5.6.40.0120.00613.96
5.6.30.0030.01014.07
5.6.20.0090.00313.98
5.6.10.0090.00613.85
5.6.00.0140.00014.00

preferences:
65.79 ms | 401 KiB | 5 Q