3v4l.org

run code in 300+ PHP versions simultaneously
<?php $its = 1e5; $true = true; $fals = false; $stri = 'string'; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) { if ( $true ); if ( $fals ); if ( $stri ); } echo 'plain : ', $old = ( hrtime(true)-$t ) / 1e9, "s\n"; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) { if ( empty( $true ) ); if ( empty( $fals ) ); if ( empty( $stri ) ); } echo 'empty : ', $old = ( hrtime(true)-$t ) / 1e9, "s\n"; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) { if ( ! $true ); if ( ! $fals ); if ( ! $stri ); } echo 'not : ', $old = ( hrtime(true)-$t ) / 1e9, "s\n"; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) { if ( ! empty( $true ) ); if ( ! empty( $fals ) ); if ( ! empty( $stri ) ); } echo 'notemp: ', $old = ( hrtime(true)-$t ) / 1e9, "s\n"; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) { if ( isset( $true ) ); if ( isset( $fals ) ); if ( isset( $stri ) ); } echo 'isset : ', $old = ( hrtime(true)-$t ) / 1e9, "s\n"; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) { if ( ! isset( $true ) ); if ( ! isset( $fals ) ); if ( ! isset( $stri ) ); } echo 'notiss: ', $old = ( hrtime(true)-$t ) / 1e9, "s\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.4.10.0040.01222.01
8.3.140.0100.02416.69
8.3.130.0070.01016.62
8.3.120.0070.03118.94
8.3.110.0080.00616.53
8.3.100.0030.01224.06
8.3.90.0030.01726.77
8.3.80.0040.01417.97
8.3.70.0160.01916.88
8.3.60.0070.03018.18
8.3.50.0100.02616.56
8.3.40.0070.03523.66
8.3.30.0100.02718.71
8.3.20.0000.01524.18
8.3.10.0000.01524.66
8.3.00.0080.00826.16
8.2.260.0000.01516.31
8.2.250.0060.00918.27
8.2.240.0060.00916.98
8.2.230.0070.00720.94
8.2.220.0070.01037.54
8.2.210.0000.01426.77
8.2.200.0070.01316.50
8.2.190.0110.01816.58
8.2.180.0140.02116.38
8.2.170.0060.02322.96
8.2.160.0100.03022.96
8.2.150.0030.01225.66
8.2.140.0100.00624.66
8.2.130.0080.00826.16
8.2.120.0060.00919.66
8.2.110.0000.01922.30
8.2.100.0070.01418.09
8.2.90.0090.00919.13
8.2.80.0040.01517.97
8.2.70.0090.01217.63
8.2.60.0180.01117.36
8.2.50.0130.01517.25
8.2.40.0110.01617.38
8.2.30.0110.01417.37
8.2.20.0120.01517.36
8.2.10.0140.01217.55
8.2.00.0120.01517.55
8.1.300.0000.01620.19
8.1.290.0040.01530.84
8.1.280.0110.02825.92
8.1.270.0120.00420.68
8.1.260.0060.00926.35
8.1.250.0040.01128.09
8.1.240.0040.01523.84
8.1.230.0070.01320.39
8.1.220.0030.01317.76
8.1.210.0070.01018.77
8.1.200.0030.01317.35
8.1.190.0130.00916.90
8.1.180.0100.01517.05
8.1.170.0070.01817.13
8.1.160.0110.01317.17
8.1.150.0090.01517.13
8.1.140.0130.01117.30
8.1.130.0080.01616.99
8.1.120.0080.01817.22
8.1.110.0160.00917.11
8.1.100.0110.01517.31
8.1.90.0090.01617.24
8.1.80.0100.01617.36
8.1.70.0120.01417.22
8.1.60.0150.01117.25
8.1.50.0150.01117.18
8.1.40.0130.01417.55
8.1.30.0130.01417.19
8.1.20.0130.01317.36
8.1.10.0180.00817.19
8.1.00.0110.01517.19
8.0.300.0030.01318.77
8.0.290.0040.01416.63
8.0.280.0110.01616.60
8.0.270.0130.01416.52
8.0.260.0140.01216.57
8.0.250.0120.01416.57
8.0.240.0120.02016.57
8.0.230.0100.01816.73
8.0.220.0150.01216.57
8.0.210.0070.02016.52
8.0.200.0140.01216.63
8.0.190.0130.01616.56
8.0.180.0150.01216.57
8.0.170.0120.01516.57
8.0.160.0160.01216.80
8.0.150.0120.01416.52
8.0.140.0090.01716.63
8.0.130.0140.01116.57
8.0.120.0130.01216.57
8.0.110.0080.01816.63
8.0.100.0090.01716.52
8.0.90.0080.01716.57
8.0.80.0110.01616.66
8.0.70.0090.01916.52
8.0.60.0090.01816.52
8.0.50.0130.01516.52
8.0.30.0120.01416.56
8.0.20.0090.01716.63
8.0.10.0110.01616.81

preferences:
57.16 ms | 403 KiB | 5 Q